Short windows batch script to truncate filenames with extension .txt. Can be anything really, just replace the
This script makes the file at most 20 characters long, but can be changed here:
This is done in a subroutine, but can be done directly as well.
for /R %location% %%A in (*.txt) do call :shorten "%%A"
ren %1 "%_sh%%_ex%"