i have some file named:
11223344_0123_.pdf
11223355_1234_.pdf
(or if can be more simply i can generate name as 11223344_0123.pdf, whitout last underscore)
i need rename all files without chars beetween underscore, and obtain:
11223344.pdf
11223355.pdf
i have write this
Code: Select all
setlocal enabledelayedexpansion
for %%a in (*_*) do (
set file=%%a
ren "!file!" "!file:_=!"
)
similar
Code: Select all
ren "!file!" "!file:_*_=!"
can you help me? really thanks