I have scripted Xlong.bat to report all file / folder paths that exceed the 255 character limit on a specified drive.
The syntax for using Xlong.bat is:
Xlong DriveLetter
Where DriveLetter is the drive letter, like C: or D:.
Xlong.bat contains:
@echo off if \{%1\}\{\} @echo Syntax: XLong DriveLetter&goto :EOF setlocal EnableDelayedExpansion set wrk=%1 set wrk=%wrk:"=% if "%wrk%" EQU "" @echo Syntax: XLong DriveLetter&endlocal&goto :EOF set drv=%wrk:~0,1%:if not exist %drv% @echo Syntax: XLong DriveLetter&endlocal&goto :EOF for /F "Tokens=*" %%a in ('dir %drv% /b /s /a') do ( set name=%%a if not "!name:~255,1!"
"" echo Excessively long name: "%%a" ) endlocal
0 comments
Hide comments