Move File

suggest change

File static class

The File static class can be used for this purpose.

File.Move(@"sourcePath\abc.txt", @"destinationPath\xyz.txt");

Remark1: A move on the same volume only updates the directory entry, so the time does not grow with the file size.

Remark2: File.Move(string, string) throws if the destination already exists. It does not overwrite that file.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents