(Otherwise TC just says: "Error: Directory [YourDirectory] not created!")
EXAMPLE 1:
Code: Select all
REM Test very long file names
SET s10=1234567890
SET s20=%s10%%s10%
SET s50=%s20%%s20%%s10%
SET s100=%s50%%s50%
SET s240=%s100%%s100%%s20%%s20%
MKDIR C:\%s240%
DIR> C:\%s20%
COPY C:\%s20% C:\%s240%\
When using the Windows Explorer the copy operation fails too. It says: "Cannot copy 12345678901234567890: The file name you specified is not valid or too long. Specify a different file name."
When using TC 6.02 the copy operation succeeds, but C:\%s20% is copied to C:\%s240%\123456789012345 truncating the full file name to 259 (=3+240+1+15) characters.
EXAMPLE 2:
Code: Select all
REM Test very long file names
SET s10=1234567890
SET s20=%s10%%s10%
SET s50=%s20%%s20%%s10%
SET s100=%s50%%s50%
SET s230=%s100%%s100%%s20%%s10%
MKDIR C:\a\%s230%
DIR> C:\a\%s230%\%s20%
XCOPY C:\a C:\Backup\a\ /E
When using the Windows Explorer the copy operation succeeds, but C:\a\%s230%\%s20% is copied to C:\Backup\a\%s230%\123456~1. That is, the last part is abbreviated to the short name 123456~1 to prevent overflow.
When using TC 6.02 the copy operation succeeds, but C:\a\%s230%\%s20% is copied to C:\Backup\a\%s230%\1234567890123456 truncating the full file name to 259 characters (MAX_PATH-1 in windef.h).
NOTE: This case shows a real danger: When you make a backup of a deep tree with TC 6.02 there is a slight chance that you lose information without realizing it!