Hi... I am trying to find a way to remove 'n' characters fro ALL files in a DOS directory. I found this on the web but it doesn't work.
I am not overly familiar with DOS and cmds so any help will be greatly appreciated.. many thanks
tried:@echo off
setlocal enabledelayedexpansion
set FOLDER_PATH="D:\Some DOS CMDS\NEW FOLDER"
for %%f in (%FOLDER_PATH%*) do if %%f neq %~nx0 (
set "filename=%%~nf"
ren "%%f" "!filename:~0,-26!%%~xf"
)
PAUSE