0

I am organizing 60,000+ images, and need to edit down their names. I would love to just do a batch rename, as this would likely take 60+ hours otherwise.

The names are similar to what follows: 2013-10-27 17_46_28-pro image plus 18234

I need to either switch "pro image plus 18234" with "2013-10-27 17_46_28" (around the hyphen located before the word pro (although the word pro does change)), or if that isn't possible, remove just "2013-10-27 17_46_28-" altogether. Definitely prefer to switch the parts of the name over deleting, so as to improve the integrity of my records.

There will always be the same number of starting characters, but after that hyphen (before pro in this example), there is a varying number of characters.

Willing to download programs and use whatever code needed (although I am not a programmer in the least, so I will need some help with the code for this first time)

Thanks very much, John Fielder (Sorry if there is already a forum on this, I looked for a bit and couldn't find anything)

1

You can try something like this (run it in whatever directory holds the files):

@echo off
setlocal

FOR /F "delims=" %%A IN ('dir /s /b /a:-d *.*') DO (
  CALL :swap "%%A"
)

GOTO :EOF

:swap
  set fileDir=%~dp1
  set filename=%~n1
  set ext=%~x1

  set firstPart=%filename:~0,19%
  set secondPart=%filename:~20%
  move "%~f1" "%fileDir%%secondPart%-%firstPart%%ext%"
GOTO :EOF

Notes:

  • It'll rename anything in the current directory, or in any subdirectories.
  • You probably will want to modify the dir command to be more specific about which files to rename.
  • Probably should double-check the offsets. Based on your example, the first bit seems to be 19 characters long. I'm also assuming you want to keep the dash between the two parts.
  • Really, it would probably be a good idea to throw an echo in front of the move command, and run it once that way, just to make sure the results are what you're hoping for.

I tried it against a pretty simple workload, and it seemed to work, but YMMV.

0

I always use this program: http://www.den4b.com/?x=products&product=renamer

It's pretty easy to setup, doesn't need any programming, you set up rules, and it will do them in order. In this case you need first the rule "replace", then probably "delete" position position 10~ till end, then "serialize" sufix, pad lenght to 3.

Play with the program, as it is easy, you can drag and drop the files or multiple folders to it. When dragging always start the drag from the first file, otherwise it will mess the order.

0

you can use Bulk Renaming Tool from Download from here

the User interface thats getting used to. they have good tutorial here to help you along

Not the answer you're looking for? Browse other questions tagged or ask your own question.