[CLOSED] WINDOWS: CopyFile() limit?
Posted: Mon Oct 28, 2024 4:39 pm
While trying to copy a bunch of files, each with a combined path name of about 100 characters long, only the first 265 copy operations succeed, while the rest will fail.
At first I thought that the paths of the failed copy operations could be corrupted, but I tried to run them separately and they worked.
Here's a pseudocode of the routine:
The paths and file names are all valid because the copy operations work if only 265 of them are performed at one go.
Anyone have any idea why the 265 limit?
At first I thought that the paths of the failed copy operations could be corrupted, but I tried to run them separately and they worked.
Here's a pseudocode of the routine:
Code: Select all
fileName.s = "SOME_REALLY_LONG_FILENAME_WITH_DATES_AND_CODES_AND_STUFF.txt"
OpenFile(0, foldersFile.s)
While Not Eof(0)
pathName.s = ReadString(0) ; the destination folder name
fName = ; the original fileName modified with different dates and codes
If CopyFile(GetCurrentDirectory() + "\sample.txt", pathName + fName)
Debug "sample.txt > copied to > " + pathName + fName
EndIf
Wend
CloseFile(0)
Anyone have any idea why the 265 limit?