Using FB2K for correcting file names that are too long ?
Reply #1 – 2012-04-14 09:26:49
Before commiting to a massive copy/backup job, it is wise to check if any files exceed the default path length limit. For NTFS and FAT filesystems, the default Windows path length limit is around 255-259 characters. For NTFS and FAT filesystems, the length of the name of a single file or directory component is limited to 255 characters For NTFS filesystems only, the theoretical maximum path length limit is actually around 32767 characters; but the Windows built-in copy programs do not give you control of these features. But, there are some third-party programs which can control these features, and can set the max path length while copying; one such program is a command line copy tool named XXCOPY (freeware and sharewrae versions available). Here is an example command line of using XXCOPY to perform such a task:xxcopy "E:\source folder" "G:\destination folder" /MD /YY /E /K /R /H /U0 /FF /I /VL /oB3 /oS3 /oE3 /oP2 /oX2 /Fo"G:\destination folder\log_copied.txt" /oN"G:\destination folder\log.txt" Explanation of each XXCOPY command-line switch:/MD Makes destination directory before all other actions/YY Suppresses all prompts unconditionally; yes to everything; do not stop and ask me anything./E Processes directories and subdirectories, including empty ones./K Keeps the source attributes/R Allows overwrite or delete of read-only files/H Copies hidden and system files/U0 Updates all files; ignores whether the file exists or not in destination./FF Fuzzy filetime matching; allow matches within +/- 2 second range/I If destination directory does not exist and copying more than one file, assumes that destination must be a directory (no prompting)./VL Sets the maximum path length to 32767 characters if destination is an NTFS filesystem/oB3 Log Output - Reports to screen and log file, brief command switch list/oS3 Log Output - Reports to screen and log file, skipped file list (with the reason why skipped)/oE3 Log Output - Reports to screen and log file, error summary with the system error code/oP2 Log Output - Reports to log file, detailed command switch list/oX2 Log Output - Reports to log file, excluded items list/Fo<file> Creates log file - listing of files which were successfully processed/oN<file> Creates log file - report of the job Another way of managing this is to download a freeware tool named CutLongNames http://www.replsoft.com/cutlongnames.html It will search a specified folder (and all sub-folders) for files whose path length exceeds a specified amount of characters. Once the list of found files is processed, you can cut them down to the specified size with one click; or manually edit each item in the list.