ArchivedTools/ScanScripts/Windows/file length.bat

20 lines
361 B
Batchfile
Raw Normal View History

2023-12-21 00:31:35 +00:00
@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