1

I have a batch file that sits in c:\test and images that sit in c:\test\1\ and c:\test\2

I have a batch command that will recursively precede the name of each jpeg file found with the text "Album_" e.g "image001.jpg" becomes "Album_image001.jpg" This works prefectly, but i want it to add the current folder name E.g I want the image to be named Album_1image001.jpg

here is the current batch command

forfiles /S /M *.jpg /C "cmd /c rename @file Album_@file"

1 Answers1

1

If there are only the two folders you mention, this should work:

forfiles /P 1 /M *.jpg /C "cmd /c rename @file Album_1@file"
forfiles /P 2 /M *.jpg /C "cmd /c rename @file Album_2@file"
Y Davis
  • 11