Renaming more than one file at once?

  • Thread starter PLmatt91
  • 5 comments
  • 533 views
2,396
Well, I have over 3,000 files I want to rename because some files go to 1 - 10 and I skipped over a few numbers here and there, so I want to rename them all at once, but I don't want like 1 (1) or 1 (2).

Is there any program I can download or does XP that lets me redo these names in a batch? Thanks,

-Matt.
 
Your description of what you're looking to do is a bit vague, but obviously using wildcards in a command line is an option, depending on what the filenames have in common.

Another option is to list the directory into a file and edit the file into a batch file. For XP, get a command window, change to the folder containing the files, and do dir /B > \filelist. Notice I put the target file at the root of the drive so it won't appear in the list. Then use a text editor to fix the list file into the list of commands you need and change the files name to filelist.cmd. Copy the batch file into the folder so you can run it from that folder, or it won't find the files.

At first that sounds like no different than typing the commands, but you can use cut and paste to build the commands, which saves time.
Also, copy the folder somewhere safe in case you mess it up. You can get a fresh start that way if you need to.
 
Well, my description goes like this:

I have 3,000 I want renamed. In between the 3k photos, I misnamed about 500 photos. So I want to go back and rename them all to have the same name and go in order to how I saved them. I just don't want to highlight them all and have 1 (1), 1 (2), 1(3), etc.

And what you just explain is a negative. I'm not doing any thing like that because it's way too complicated for me to understand...
 
Simplest way of doing what you want is to:

1) Select all the files you want.
2) With all the files selected go to the first file in the list you want to create and just rename it, once you have done this and de-select the files XP will rename all the files selected to match the first file but with a number after it.

hope that helps.
 
Using cygwin:

count=0;for f in *.jpg; do count=$((count + 1)); mv $f $count.jpg;done
 
Back