File.Copy node issues

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?

Hi @kiknchikn2060

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

1 Like

@Kulkul
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?

@kiknchikn2060

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.

1 Like

@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)

1 Like

This makes no sense, why do I have to specify each individual file name and extension in the destination Path…
They just had to complicate things for nothing.

Not necessarily true, but without seeing. What you are actually up to I can’t say.

As this thread is almost seven years old beat to start a new topic with your use case.

1 Like