ArchivedTools/ScanScripts/Windows/file length.bat
2023-12-21 01:31:35 +01:00

20 lines
361 B
Batchfile

@echo off
REM Script to be run from within dir with .dats (move script)
setlocal EnableDelayedExpansion
for %%i in (*.dat) do (
(echo %%~fi) > tempfile.txt
for %%? IN (tempfile.txt) DO ( SET /A strlength=%%~z? - 2 )
echo !strlength!
if !strlength! GTR 256 echo "%%i is too large"
)
del tempfile.txt /q
endlocal
REM Create dir script can begin here
pause