at the end i use this method
Code: Select all
for %%a in (*_*) do (
set file_completo=%%a
set file_nome=%%~na
set name=!file_nome:~0,-6!
ren "!file_completo!" "!name!.pdf"
)
Code: Select all
for %%a in (*_*) do (
set file_completo=%%a
set file_nome=%%~na
set name=!file_nome:~0,-6!
ren "!file_completo!" "!name!.pdf"
)