Chaos Project

Game Development => Sea of Code => Topic started by: Shek on January 02, 2014, 02:46:10 pm

Title: Help: Quick Batch script to do rename files:
Post by: Shek on January 02, 2014, 02:46:10 pm
I'm looking for a quick script that can be used with a dos batch file, or some other easy thing to do this:

I have a list of SKU's and ID numbers:
Spoiler: ShowHide
SKU:         ID:
120100   18055
107100   19879
340100   16743
709110   15162
404210   11848
...

The list is about 5000 long... UGH!

I have a 2TB folder with images in it that are named after the ID numbers, I need to rename those files to be the matching SKU number.
e.g. I have a file named 18055 and I need to rename it, and any other files named 18055, to 120100.

Is there a quick way to do this procedurally? I already have a .txt file with all the data. 

Disclaimer: I am really bad at scripting / programming
Title: Re: Help: Quick Batch script to do rename files:
Post by: locowhiteknight on January 02, 2014, 04:24:34 pm
Spoiler: ShowHide
http://www.advancedrenamer.com/


I use advanced renamer for batches.

Good luck :-*

Edit:

This method will work a lot better for what you're trying to accomplish (if you have dos and excel at least).

Spoiler: ShowHide
http://benholland.me/news/rename-multiple-files-using-excel-in-windows/ (http://benholland.me/news/rename-multiple-files-using-excel-in-windows/)
Title: Re: Help: Quick Batch script to do rename files:
Post by: Shek on January 03, 2014, 01:09:47 am
You just made me so happy dude! Thank you so much for the CMD prompt link.

My girlfriend's work assigned her this task and gave her the entire week to complete it (they insist that it can only be done by hand.  Their IT guy doesn't seem to realize that this can be done in under 5 minutes with a script).

Now she gets to take the rest of the week off!

You rock! +1
Title: Re: Help: Quick Batch script to do rename files:
Post by: locowhiteknight on January 03, 2014, 01:39:50 pm
Glad to hear it worked.

A level up  :haha: wow! So... do I get to assign a skill point now.  :???:

If so, I'll take a +1 to scripting. :naughty:
Title: Re: Help: Quick Batch script to do rename files:
Post by: KK20 on January 03, 2014, 02:09:55 pm
Quote from: locowhiteknight on January 03, 2014, 01:39:50 pm
If so, I'll take a +1 to scripting. :naughty:

Don't. The Scripter class is hell to begin with in the early levels--you'll be grinding for days. And when you finally job advance to a Programmer, your originality goes completely down the drain. It is such a bandwagon class because it gets OP as hell in the final levels. I regret making this character get to such a high level--I don't feel any more special than the next guy. Maybe I'll delete him and create the less popular but so much more diverse Audio Engineer.

:V:

EDIT:
Spoiler: ShowHide
Nice work, Ryex. Now our gear will get even MORE expensive to buy. >.>
Title: Re: Help: Quick Batch script to do rename files:
Post by: Ryex on January 03, 2014, 02:20:38 pm
I don't know what you guys are talking about. The Scripter class is hella awesome. sure once you get get into the programmer tier the main quest line gets a bit repetitive and menial for a bit but the side quests are the best in the game! and once you get passed the Programmer level and job advance to Software Engineer your basically the most OP "there are no rules anymore" boss as hell player around. Parties will THROW money at you to join them. nothing beats a Software Engineer for grinding the Cooperate region. and every one wants to grind the Cooperate region. the drops there are freaking beast.
Title: Re: Help: Quick Batch script to do rename files:
Post by: Blizzard on January 03, 2014, 03:02:34 pm
Agreed with Ryex. True, as a programmer you may have somewhat less creative room than a scripter, but only because other people already did do a good job at making things run. And those people are Software Engineers. They are the ones that come up with the creative stuff.