Hi
I am using File.Replace and am getting "Unable to remove the file being replaced".
It works fine if the replace occurs on the same drive but errors if not. For example:
Works:
File.Replace("C:\\Test\\Test.txt", "C:\\Test\\Test.txt", "C:\\Test\\Test_BAK.txt");
Fails:
File.Replace("C:\\Test\\Test.txt", "G:\\Test\\Test.txt", "C:\\Test\\Test_BAK.txt");
In both cases folders and files exist where appropriate, permissions are valid and there are no locks on the files.
Anybody got any ideas?
Cheers
I am using File.Replace and am getting "Unable to remove the file being replaced".
It works fine if the replace occurs on the same drive but errors if not. For example:
Works:
File.Replace("C:\\Test\\Test.txt", "C:\\Test\\Test.txt", "C:\\Test\\Test_BAK.txt");
Fails:
File.Replace("C:\\Test\\Test.txt", "G:\\Test\\Test.txt", "C:\\Test\\Test_BAK.txt");
In both cases folders and files exist where appropriate, permissions are valid and there are no locks on the files.
Anybody got any ideas?
Cheers