Multiple File Renaming

Aug 23, 2009 40 Replies

formatting link

I've used this to convert a customer's long filenames into DOS compatible (8.3) filenames. It's easy to use.

Richard

Do you always answer the question in a post with a reply that does not provide the answer?

A file concatenator is NOT what he wanted.

Thanks, Martin! That's the other thing I keep forgetting, batch files. Back in my DOS OrCAD days, I literally had hundreds of batch files to process and tile Postscript output, then send it to a network printer.

...Jim Thompson

| James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | | http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

Write a batch file. All the following is command line stuff.

  1. Do a directory listing. dir /b *.pdf > zit.bat This will put the bare contents of a directory listing into a file called zit.bat.
  2. Open zit.bat in your favorite text editor. The one you use should have column select which allows you to move and copy the columns. A little search and replace of "eS" to "ren eS" will put in the rename command. Column copy the original file name column then do column moves for the new file name. You'll want the final result to look like this for each line. ren eStmt_01_22_2009.pdf eStmt_2009_01_22.pdf
  3. Save your file and run the zit.bat.

If you want, you can email zit.bat from step 1. I can easily fill in and do the manipulation in a couple minutes.

Mark

Thanks, Mark! There are only 20 files right now, and I was just being lazy; but I don't want to waste anyone's time... I thought there might be something in Windows I was overlooking ;-) ...Jim Thompson

| James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | America: Land of the Free, Because of the Brave

Unfortunately, Windows command line is pretty weak compared to Unix. Ultra Edit should be able to do column manipulations pretty easily.

Mark

Even easier...

JDirPrint (*) the Directory Open with UltraEdit, column mode Copy/paste, modifying right column add ren in front Save as BulkRename.bat

Close

Double Click on BulkRename.bat in Windows Explorer

Done

Never opened a DOS window ;-)

(*) JDirPrint is handy for printing CD/DVD labels when doing back-ups.

...Jim Thompson

| James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | | http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

That was so easy I guess it's time I applied that nice and simple technique to my thousands of photos ;-)

...Jim Thompson

| James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | | http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

Hey, migrating to the ISO date format for invoices and stuff? I did that three months ago.

Regards, Joerg http://www.analogconsultants.com/ "gmail" domain blocked because of excessive spam. Use another domain or send PM.

For renaming photos, I use jhead (command line program) which uses the date and time info in the EXIF header for the photo name. XnView (thumbnail viewer program) also has this feature if you don't like command line. I would guess that IrfanView has this function.

Mark

NO! READ the thread, dingledorf. He is trying to get a bank to switch. *HE* still has to do it manually since they have not done so yet.

Twit. Messing around with upconverting to MSWord doc, pushing stuff into tables, rearranging the columns, extracting the result to "normal" text, then reconverting from MSWord back to text?

Any good programmers editor will work directly with rectangles of text and not require any file conversions.

Looks like a cool tool for its target audience.

in=20

Given the complexity and volume i would have written a batch file (in a brute force way, copy lines...). If it continued to be an ongoing issue i might have written a PHP or Perl script.

=20

=46or a single directory, containing only original format file names to preferred style filenames that could be really great. If you did that to a directory of both style file names disaster could result, especially if applied repeatedly.

=A0 =A0 =A0...Jim Thompson

For some things, a spread sheet is the better option. You can easily insert a column on the left and fill all of its cells with the command.

I did a variation of qrk's batch file approach, to rename two years' worth. Now it's just two a month, so I can cope ;-)

But I expect to apply the scheme to my thousands of jpg photos.

...Jim Thompson

| James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | | http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

Yes, that true. That?s why I copied the file and renamed it to another directory. So things cant get muffed up. The batch file assumes all the PDF files have the same name format.

Cheers

append

=A0 =A0 =A0...Jim Thompson

makes

Am i reading this? Abusing a spreadsheet to do a little file renaming?

another=20

Yes i see. I did not read the code all that carefully.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required