Post by troycheek on Nov 14, 2015 15:28:05 GMT 1
This turned out to be more of a Windows Vista/7 networking problem than a GB32 problem. I wrote a program which copies large (as big as 12 GB) MPEG-2 video files from a mapped network drive to a local drive, performs various operations including re-encoding them as MP4 files, then copies the smaller-but-still-large (up to 2 GB) files back to the network drive. The problem was that the FileCopy, CopyFile, and MoveFile commands were all occasionally failing to complete with a "Error at CopyFile,FileCopy" or "Error at (Re)Name/MoveFile" message. It usually happened when copying the bigger file from the network drive, but less often when copying the smaller file back to the network drive. I began to think that GB32 had a problem with big files or mapped network drives, but I couldn't figure out why it would work most of the time.
I re-wrote the program to use the Windows commands Copy and Move, roughly System "cmd /C copy N:\Path\File.ext L:\Path\File.ext", Wait, Show SW_HIDE, Idle, only to discover the same problem. (Worse, it was a silent fail as I lacked proper error checking and was intentionally hiding the output because reasons.) More testing showed that pretty much any access of the network drive while the file copy operation was in progress could cause it to fail, including trying to load a small *.log file to check the progress of the program. I could even very rarely duplicate the problem by using Windows Explorer to drag and drop two files (in two separate operations) at the same time. Obviously, the problem was not with GB32, but rather with the network or maybe the drive/controller or maybe the odd combination of Vista/7 computers I'm using.
The solution? A free (for personal use) utility called TeraCopy. While it's supposed to be faster than Windows own file copy operations (I don't think it is), the feature I needed was that it was more robust. Accessing the drive while TeraCopy was copying files to/from it might slow down the operation but I couldn't ever make it error out. System "cmd /C TeraCopy.exe copy N:\Path\File.ext L:\Path\", Wait, Show SW_HIDE, Idle worked wonders. It also has a nice little progress display (much better than the Windows default or the one I cobbled together).
So, a problem that turned out not to be GB32 related solved with a program not GB32 related, but presented here in case anyone else ever has a problem copying huge files with GB32 and needs a solution.
Edit: "Show SW_HIDE" is because in the original incarnation of this program, everything was running silently in the background, so that was part of the System command that I kept cutting and pasting. Not much use in using it with TeraCopy since it displays a progress bar regardless.
I re-wrote the program to use the Windows commands Copy and Move, roughly System "cmd /C copy N:\Path\File.ext L:\Path\File.ext", Wait, Show SW_HIDE, Idle, only to discover the same problem. (Worse, it was a silent fail as I lacked proper error checking and was intentionally hiding the output because reasons.) More testing showed that pretty much any access of the network drive while the file copy operation was in progress could cause it to fail, including trying to load a small *.log file to check the progress of the program. I could even very rarely duplicate the problem by using Windows Explorer to drag and drop two files (in two separate operations) at the same time. Obviously, the problem was not with GB32, but rather with the network or maybe the drive/controller or maybe the odd combination of Vista/7 computers I'm using.
The solution? A free (for personal use) utility called TeraCopy. While it's supposed to be faster than Windows own file copy operations (I don't think it is), the feature I needed was that it was more robust. Accessing the drive while TeraCopy was copying files to/from it might slow down the operation but I couldn't ever make it error out. System "cmd /C TeraCopy.exe copy N:\Path\File.ext L:\Path\", Wait, Show SW_HIDE, Idle worked wonders. It also has a nice little progress display (much better than the Windows default or the one I cobbled together).
So, a problem that turned out not to be GB32 related solved with a program not GB32 related, but presented here in case anyone else ever has a problem copying huge files with GB32 and needs a solution.
Edit: "Show SW_HIDE" is because in the original incarnation of this program, everything was running silently in the background, so that was part of the System command that I kept cutting and pasting. Not much use in using it with TeraCopy since it displays a progress bar regardless.