I already found some solution for renaming files. Some did not really work, some only added a suffix after the file ending like
@echo off
Setlocal enabledelayedexpansion
For %%a in (*.*) Do (
Ren "%%a" "%%a Tenor 1"
)
Pause&Exit
My problem: I have several filetypes in a folder like:
song1.mp3
song2.mp3
Text1.txt
Text2.txt
Document1.pdf
Document2.pdf
Add_Tenor_1.bat
Add_Tenor_2.bat
ReplaceBlankwithUnderline.bat
and so on. Now i want to add for example to all files except for the batch files a suffix like "* Tenor 1".
song1 Tenor 1.mp3
song2 Tenor 1.mp3
Text1 Tenor 1.txt
Text2 Tenor 1.txt
Document1 Tenor 1.pdf
Document2 Tenor 1.pdf
Add_Tenor_1.bat
Add_Tenor_2.bat
ReplaceBlankwithUnderline.bat
Is it possible to use *.*
in a for condition with an exception (for .bat) ?
How would the code for the batch file look like?
Another thing is to add the suffix only for .txt and .pdf files for example. Does this work in one routine or do i need one for .txt and one for .pdf?
song1.mp3
song2.mp3
Text1 Tenor 1.txt
Text2 Tenor 1.txt
Document1 Tenor 1.pdf
Document2 Tenor 1.pdf
Add_Tenor_1.bat
Add_Tenor_2.bat
ReplaceBlankwithUnderline.bat
And how would the code for this batch file look like?
Thank you a lot!
And i know there are Programms like Renamer. But as i always want to ad the same (not at the same time) it is quicker to press just the batch instead of opening choosing and renameing it with a porgramm :)
regards chrisdi91