Answer the question
In order to leave comments, you need to log in
How to bulk rename PDF files by removing numbers (numbering) before the first letter?
Tell me, please, where can I find information on this issue:
"How to massively rename PDF files by deleting numbers (numbering) to the first letter?"?
I searched a lot of sites, but I did not find the answer.
ps I don't know how difficult the question is, I put it "simple". It is desirable to need a batch file, and not third-party software.
Answer the question
In order to leave comments, you need to log in
Where can I find information on this issue
set /?
if /?
… for %%F in (*.pdf) do (
set "old_name=%%~nF"
set "new_name=%%~nF"
call :SUB
)
exit /b
:SUB
set "ch=%new_name:~0,1%"
if "%ch%" geq "0" if "%ch%" leq "9" (
set "new_name=%new_name:~1%"
goto SUB
)
if not "%new_name%" == "%old_name%" ren "%old_name%.pdf" "%new_name%.*"
exit /b
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question