Help Bulk Filename Change

Lazarus

Part of the furniture
Joined
Dec 22, 2003
Messages
2,874
Guys,

I have a rather larger number of files that I want to do a name change of.

eg
[xxx1] file1.xxx
[xxx2] file2.xxx
[xxx3] file3.xxx
[xxx4] file4.xxx
etc

I want to bulk change to

file1.xxx
file2.xxx
file3.xxx
file4.xxx

any suggestions?
 

Cadelin

Resident Freddy
Joined
Feb 18, 2004
Messages
2,514
I take it you are not working in Linux because if you are a small shell script would do this easily?
 

Kryten

Old Cow.
Moderator
Joined
Dec 22, 2003
Messages
3,351
Always used to do that with a prog called ACDSee but that was for images. Did normal files too, but there must be a 3rd party app to do it. Windows does it to a degree but only with its own prefixes.
 

ST^

Can't get enough of FH
Joined
Dec 22, 2003
Messages
2,351
I usually use Excel to create a batch file. Paste in the first list of filles, then use a formula or find/replace in the 2nd column to create a list of what they should be renamed to. Then use a formula on the 3rd column to put them together as "move XXXX XXX", paste the whole lot into a .bat file and away we go!

But that's just me :)
 

MYstIC G

Official Licensed Lump of Coal™ Distributor
Staff member
Moderator
FH Subscriber
Joined
Dec 22, 2003
Messages
12,443
Google "RenamerFairy"
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,925
I read that as reamer-fairy, but that's just cause I was expecting something dodgy from the G :p
 

dysfunction

FH is my second home
Joined
Dec 22, 2003
Messages
9,709
I know in Windows XP if you can just highlight all the files you want to rename press F2 and change the name of the one that is "edited" all the others will be changed to the same name...
 

SheepCow

Bringer of Code
Joined
Dec 22, 2003
Messages
1,365
I have a regular expression based renaming tool called 'rren' which you can use:
http://www.benedictoneill.com/content/fh/rren.7z

It requires .NET 2 to be installed iirc, usage is:

Code:
Usage: rren [-s] [-i] [-d] match rename

  -s         Include subdirectories.
  -i         Case insensitive regular expression.
  -d         Use full path (including directory) in the regular
             expression match.
  match      The regular expression to match files with.
  rename     The expression to rename files to, using $1, $2
             etc. to specify matches from the regular expression.

.NET regexs aren't quite the same as PCRE ones iirc, been a while since I used it so I advise testing on some copied files first. It's quite a 'shoot yourself in the face' tool, i.e. you can rename all your files on top of each other :p

Use at own risk :)
 

Users who are viewing this thread

Top Bottom