MSDOS - Rename multiple files partially
Solved
CassThor
Posted messages
135
Status
Membre
-
Anonymous user -
Anonymous user -
Hello,
An architect made a mistake and sent us nearly 2000 files with incorrect syntax.
The files must follow a very precise naming convention, * being a specific character for the file, always different:
PLN_*****_**_****.pdf
(ex: https://www.zupimages.net/ )
All the files he has been sending us for months are named PNL, which blocks the import into our software.
Here is the .bat file I would like to create:
In the folder, look for files starting with PNL and ending with .pdf
replace the first three characters with PLN.
I must admit that I know nothing about msdos, can someone help me? As a side note, I mention that we do not have admin rights on our PCs.
Thanks to anyone who can help me.
"There are no stupid questions, only stupid answers."
An architect made a mistake and sent us nearly 2000 files with incorrect syntax.
The files must follow a very precise naming convention, * being a specific character for the file, always different:
PLN_*****_**_****.pdf
(ex: https://www.zupimages.net/ )
All the files he has been sending us for months are named PNL, which blocks the import into our software.
Here is the .bat file I would like to create:
In the folder, look for files starting with PNL and ending with .pdf
replace the first three characters with PLN.
I must admit that I know nothing about msdos, can someone help me? As a side note, I mention that we do not have admin rights on our PCs.
Thanks to anyone who can help me.
"There are no stupid questions, only stupid answers."
3 réponses
For now, I tested the command:
ren "PNL_*****_**_****.pdf" "PLN_*****_**_****.pdf"
However, I get files with this name:
PLN_87037_01_1010.pdf__
--
"There are no stupid questions, only stupid answers"
ren "PNL_*****_**_****.pdf" "PLN_*****_**_****.pdf"
However, I get files with this name:
PLN_87037_01_1010.pdf__
--
"There are no stupid questions, only stupid answers"