• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Can someone write me a simple script for Windows? File renamer.

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
I need a script that will look in a folder and rename the files based on the following criteria:

pic1 = a
pic2 = b
pic3 = c
etc

So for example:

bedroom-3-pic6.jpg would be renamed to bedroom-3-f.jpg

I'd like to be able to simply drop the script into the folder, double click it, and have it automatically rename everything. I think with perl scripts I have to run it from CLI?
 
I think with perl scripts I have to run it from CLI?
Nope! Put this at the top of your Perl script:
Code:
@rem='
@perl "&#37;~dpn0.bat" %*
@goto endofsh
';
Then put this at the bottom:
Code:
__END__

:endofsh
Mind the blank lines, and be sure to put one before "__END__". Then rename the file as a .bat, and it becomes a batch file!

That's easy; the renaming job looks harder. :hmm:

Edit: Are you guaranteeing that there will be no pic27 after pic26?
 
Last edited:
I've seen free utilities to do this, and used them in the past. Google around a bit and I'm sure you'll find something.
 
If you really can't find anything I could write something up in c# to do that just be specific on what you want and no gaurantees if I mess up your computer lol, which shouldn't happen. You probably want 27 to be aa and 28 to be ab and so on. That wouldn't be too hard.
 
Back
Top