37
Views
1
Comments
[FileSystem] File_Move does not overwrite file in target directory
Question
filesystem
Service icon
Forge asset by João Portela
Application Type
Service

I am trying to move a file to a new location using File_Move. The description of File_Move states: Moves a file from a specified location to another directory. If the file already exists at the destination location, it is overwritten. 

It appears that this is not the case. If I the file already exists in the target directory, I get Win32Error: 183.

I guess this is just a problem with the description not matching? 

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Werner,

Thanks for bringing this to our attention. File_Move uses FileInfo.Move from System.IO, and though the description isn't explicit, it does say "An I/O error occurs, such as the destination file already exists", so I presume that indeed, it doesn't overwrite. I'll update the documentation.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.