Okay, I have a lot of subfolders. Each subfolder contains some files. In each subfolder I want to add som text in the end of one file with the extension "tbn". The file name is not the same in each folder. Then I also want to change/rename the extension to jpg. See my example below
rename "myfile.tbn" to "myfile-poster.jpg"
I would like to do this from the command promt or from a batch file.
Have googled some of this. I would say my problem is to add the text in the end of the file "-poster" when the orginal filename varies.
You can find a file with an unknown name with a plain
forloop (seefor /?for details)./Rmakes it recursive (searching through subfolders too)the
%%~nmodifier returns the base filename only (no extension)Remove the
ECHOafter verifying it does what you want to actually enable therencommand.