I know this has to be simple. All I want to do is copy a file from one directory to another. What am I missing here?
File.Copy expecting file path with its extension. Are you looking to overwrite also?
Here is an example:
C:\Test\Copy.rvt -> File
C:\DestinationFolder\Copy.rvt -> DestinationPath
Boolean -> If you need to overwrite
Yes. I am wanting to overwrite. When you say extension, do I need to add another node? Does the file path not include the extension?
That’s it. It blows my mind how I was on the right track. Dynamo seems to hate anything you don’t type in manually.
@kiknchikn2060 It works without typing manually. You just have to specify the file with its extension.
@Kulkul First I want to thank you for taking the time to help me out. Apparently I just have bad luck.
When I first tried with the file.copy node, I did specify the extension. The second file path node doesn’t show it, but I know it there because I simply copied the first file path node and changed the path.
Now I just tried what you posted.
Still getting an error. At this point, I’m done with it and ready to punch some babies. The directory.copy and the Copy File List to New Directory (part of the Bakery package) work fine so I’ll go with those to avoid further frustration. Again, thank you very much for your help Kulkul. As always, it is appreciated.
After 1,5 year, I might have an answer for you, if you hadn’t found out about it that is.
If you were to convert the output of the
File Path node into a string, nodes more easily accept it, especially when it concerns reading/writing data from different disks. Do beware of the fact that spaces will get replaced with “%20” (which you can of course easily replace with spaces again)