Need help with a batch file
Page 1 of 1
SpykeZ




Posts: 23710

PostPosted: Sat, 5th Sep 2009 20:28    Post subject: Need help with a batch file
So theres a mame emulator for my GP2X that works without about 2000 roms, but my collection consists of 7000

I have all the file names of the ones that works and I need to make a batch file that'll move them from folder A to folder B


Back to top
WhiteBarbarian




Posts: 6011
Location: Russia
PostPosted: Sat, 5th Sep 2009 21:21    Post subject:
The most straightforward way. Create a file mv.bat, inside the file duplicate the line

MOVE "{Path to file}" "{Target directory}"

for each ROM file

For example:

MOVE "C:\Users\John\Rom 1.rom" "C:\Users\John\Folder 2\"
MOVE "C:\Users\John\Rom 2.rom" "C:\Users\John\Folder 2\"
MOVE "C:\Users\John\Rom 3.rom" "C:\Users\John\Folder 2\"

Just be careful, this will overwrite files at {Target directory}

If you already have the filenames with full path to them it is a very simple regexp replace.
So, if you have something like this

C:\Users\John\Rom 1.rom
C:\Users\John\Rom 2.rom
C:\Users\John\Rom 3.rom

Then, something along this

Find: (.+)
Replace: MOVE "\1" "C:\\Users\\John\\Folder 2\\"

will do the trick in text editor with regexp support.

Or just upload the listing and I could try to do it Smile


Back to top
Spiderman
Banned



Posts: 5877

PostPosted: Sat, 5th Sep 2009 21:54    Post subject:
lest say he doesn't know what a bat file is so .... its a text file a TXT for short with a renamed extension to bat
Back to top
WhiteBarbarian




Posts: 6011
Location: Russia
PostPosted: Sat, 5th Sep 2009 22:16    Post subject:
Spiderman wrote:
lest say he doesn't know what a bat file is so .... its a text file a TXT for short with a renamed extension to bat

He addressed it as a batch file, so 99% he knows that Smile


Back to top
SpykeZ




Posts: 23710

PostPosted: Sat, 5th Sep 2009 22:25    Post subject:
pm sent barbairan


Back to top
moosenoodles




Posts: 18411

PostPosted: Sat, 5th Sep 2009 23:23    Post subject:
adding all those thousands that do work by hand into the bat file is prob same time it take to Select click batches of them and drag them over yourself.

that is if he dont have it listed already in txt format for the filenames.
Back to top
SpykeZ




Posts: 23710

PostPosted: Sat, 5th Sep 2009 23:24    Post subject:
moosenoodles wrote:
adding all those thousands that do work by hand into the bat file is prob same time it take to Select click batches of them and drag them over yourself.


you back talking me?


Back to top
moosenoodles




Posts: 18411

PostPosted: Sat, 5th Sep 2009 23:34    Post subject:
what you mean back talking you spykes... if you mean back chatting (giving grief) no lol, im being serious,, I just couldnt see a batchfile doing that easy for you unless u were able to mass rename the files as well to something simple...

but as you said you need to seperate them from a total of 7000 was it, then im guessing here that there would be 7000 diff names of games there...and you would need to differentiate between what games were working and not, therefor needing diff names.
Back to top
Spiderman
Banned



Posts: 5877

PostPosted: Sat, 5th Sep 2009 23:44    Post subject:
moosenoodles wrote:
what you mean back talking you spykes... if you mean back chatting (giving grief) no lol, im being serious,, I just couldnt see a batchfile doing that easy for you unless u were able to mass rename the files as well to something simple...

but as you said you need to seperate them from a total of 7000 was it, then im guessing here that there would be 7000 diff names of games there...and you would need to differentiate between what games were working and not, therefor needing diff names.

or he could use Cathy http://www.mtg.sk/rva/ a listing program to list the rom directory output in into txt, edit the unneeded files add "move" and "target" ... a 15 min job mr.loudmouthpartypopper
Back to top
SpykeZ




Posts: 23710

PostPosted: Sat, 5th Sep 2009 23:51    Post subject:
moosenoodles wrote:
what you mean back talking you spykes... if you mean back chatting (giving grief) no lol, im being serious,, I just couldnt see a batchfile doing that easy for you unless u were able to mass rename the files as well to something simple...

but as you said you need to seperate them from a total of 7000 was it, then im guessing here that there would be 7000 diff names of games there...and you would need to differentiate between what games were working and not, therefor needing diff names.


a gamefile.txt comes with the mame port for the GP2x Wink


Back to top
moosenoodles




Posts: 18411

PostPosted: Sat, 5th Sep 2009 23:52    Post subject:
why partypooper lol? christ talk about over reacting Very Happy

well if there is that tool to use then great makes his job alot faster..
Back to top
moosenoodles




Posts: 18411

PostPosted: Sat, 5th Sep 2009 23:53    Post subject:
SpykeZ wrote:
moosenoodles wrote:
what you mean back talking you spykes... if you mean back chatting (giving grief) no lol, im being serious,, I just couldnt see a batchfile doing that easy for you unless u were able to mass rename the files as well to something simple...

but as you said you need to seperate them from a total of 7000 was it, then im guessing here that there would be 7000 diff names of games there...and you would need to differentiate between what games were working and not, therefor needing diff names.


a gamefile.txt comes with the mame port for the GP2x Wink


oh fuck ur sorted then Very Happy
Back to top
VGAdeadcafe




Posts: 22230
Location: ★ ಠ_ಠ ★
PostPosted: Sun, 6th Sep 2009 10:04    Post subject:
If you haven't got it sorted out I can quickly make a little proggy where you select a folder and a filename txt file and it separates those files to another folder.
Back to top
NecroViolator




Posts: 921

PostPosted: Sun, 6th Sep 2009 16:19    Post subject:
Why not try Total Commander...
I use it for everything, great file program...
Back to top
moosenoodles




Posts: 18411

PostPosted: Sun, 6th Sep 2009 16:20    Post subject:
In gonna guess that spykez has already accomplished his mission..
Back to top
SpykeZ




Posts: 23710

PostPosted: Sun, 6th Sep 2009 16:53    Post subject:
yes, yes I have, but I do appreciate the offers for help Smile


Back to top
moosenoodles




Posts: 18411

PostPosted: Sun, 6th Sep 2009 18:18    Post subject:
Anytime, glad our support services here at nforce could assist..

 Spoiler:
 
Back to top
Page 1 of 1 All times are GMT + 1 Hour
NFOHump.com Forum Index - General chatter
Signature/Avatar nuking: none (can be changed in your profile)  


Display posts from previous:   

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.8 © 2001, 2002 phpBB Group