• Welcome to SC4 Devotion Forum Archives.
 

News:

The SC4 Devotion Forums are no longer active, but remain online in an archived, read-only "museum" state.  It is not possible for regular members to post or use the private messaging system, and no technical support will be provided for any issues pertaining to the forums in their current state.  Attachments (those that still work) are accessible without login.

The LEX has been replaced with SC4Evermore (SC4E), and SC4E maintains an active Discord server.  For traditional forums, we recommend Simtropolis.

Main Menu

Batch Renaming

Started by Lowkee33, January 23, 2011, 08:58:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lowkee33

Hi all,

I was wondering if anyone knows of a program that will rename a whole bunch of files at once.

Basically what I have done is made a bunch of images with names like 0_0, 1_10, 6_23.  Adding a prefix I can do, like 0x123456, but I am still stuck with the number order.  I would like to be able to change the 0_0 to 50, the 1_10 to 82, and the 6_23 to f7 (and the other 165 files between them). 

I know there are programs like this, too many in fact.  Even a non-batch would work if it could have a list that it could remember.  Every time I do this the 0_0 is changed to 50...   

Thanks

cogeo

Quote from: Lowkee33 on January 23, 2011, 08:58:18 AM
...change the 0_0 to 50, the 1_10 to 82, and the 6_23 to f7 (and the other 165 files between them).
I can hardly see some "logic" here, so the conversion would be hard to specify in some "automated" manner, I'm afraid.

Quote from: Lowkee33 on January 23, 2011, 08:58:18 AM
I know there are programs like this, too many in fact.
I know none! Any link pls?

The only solution I can think of is make a "batch" file (.bat or .cmd) that will carry-out the desired operations, which I would suggest to be copying (under a different name) rather than renaming, so that the effects can be easily undone (deleting the copied files only).

Writing such a file can prove a little tedious, but this is unavoidable, if the renaming "rules" have no "logic". But if they do, eg it is somehow possible to get 50 from 0_0 by using formulas, you can make the conversions in Excel, and paste them into the batch file, by using a text editor capable of inserting/deleting/replacing text in column mode.

Lowkee33

#2
QuoteI know none! Any link pls?

My google search brought me here, looks like a good selection: List

I only downloaded 1-4a rename, and it could get close, but note quite.  Or should I say, I was spending enough time trying to figure it out that I just renamed them all myself.  It looks pretty good for renaming things in general, but not my specific need.

It also has some interesting functions like name files by the Star Trek Star Date.

QuoteI can hardly see some "logic" here, so the conversion would be hard to specify in some "automated" manner, I'm afraid.

Well, the logic is this.  I am working on a terrain mod, and my new method is to create one large texture (in this case 3584x12288) and then break it into 168 512x512s.  The initial results are pretty good, so I will continue.  The program that I use, Texture Maker, can do such "splitting".  The only problem is I can only define the prefix.  It orders them by columns, so I get something like 0x000000_0_0, 0x000000_0_1.....0x000000_7_23.  The suffix is changed to place into BatchPngtoFsh.

I am avoiding using the Maxis terrain texture instances, so I start at 0x50, and end at 0xf7.

But, the program doesn't need any logic.  I am always turning the _0_0 to 50.  If something could look at a folder and be told to find a specific file name and change it to a specific value, that is all I need.  If I could make a .doc with such rules to apply then that would work.


Battlecat

This program is my personal preference for bulk renaming.  I use it at work as well as for SC4:

http://www.bulkrenameutility.co.uk/Main_Intro.php

ScottFTL

There are many options available.  I've used a program called File Renamer Basic before.  It works well - and there is a free version available that isn't too crippled.  I think the main limitation is that the free version will not process subfolders.

Lowkee33

Thanks BattleCat,  that did it.  I removed the whole name, re-added 0x000000 as the prefix and then counted in hex starting from 50 (80) as the suffix.  "Warning: you are about to modify 168 files". Yes, please, thanks.

The layout was a little scary at first, but everything I needed was right in front of me.