Can't copy/move files with space at end of file name
问题 It's really crazy! I have created a file using Far 2.0 (http://www.farmanager.com/, maybe you can use some other file manager); its filename is 'C:\123.txt ' (yes, with space at the end of filepath) . And I'm trying to copy or move this file using a C# program: File.Copy("C:\\123.txt ", "C:\\456.txt", true); But it fails with the "Could not find file 'C:\123.txt '." exception. But the file exists! I'm trying the Windows API: [DllImport("kernel32.dll")] public static extern int MoveFile(string