compare a text file with files...
Moderator: DosItHelp
compare a text file with files...
Hi,
I really hope you can help me. I have a list with ROMs that I can run in coinops (old Xbox emulator) its a text file. And I have a file with more than 10000 ROMs in it. Iam looking for a batch command that can copy the ROMs that listed in the text file. Here is some info.
Place where the ROMs are:
F:\emulators\mame\roms\
Place where the text file is:
F:\coinops\
Name of the text:
Coinopslist.text
Place where the roms need to go:
F:\coinops\roms\
It would be so awesome if someone can help me!
I really hope you can help me. I have a list with ROMs that I can run in coinops (old Xbox emulator) its a text file. And I have a file with more than 10000 ROMs in it. Iam looking for a batch command that can copy the ROMs that listed in the text file. Here is some info.
Place where the ROMs are:
F:\emulators\mame\roms\
Place where the text file is:
F:\coinops\
Name of the text:
Coinopslist.text
Place where the roms need to go:
F:\coinops\roms\
It would be so awesome if someone can help me!
Re: compare a text file with files...
This assumes the files are listed one per line in the text file and that the files all exist in F:\emulators\mame\roms\
Code: Select all
@echo off
md "F:\coinops\roms\" 2>nul
for /f "usebackq delims=" %%a in ("F:\coinops\Coinopslist.text") do copy "F:\emulators\mame\roms\%%a" "F:\coinops\roms\"
echo done
pause
Re: compare a text file with files...
Yes thanks!!
where do i place the bat file?
where do i place the bat file?
Re: compare a text file with files...
It doesn't have to be in a specific location.
Re: compare a text file with files...
i am getting a error:
The system cant find the file
The system cant find the file
Re: compare a text file with files...
i probely did something wrong...
Now it scans the .txt file but isnt coping anything to the folder.
it says it cant find any files...
Now it scans the .txt file but isnt coping anything to the folder.
it says it cant find any files...
Re: compare a text file with files...
In front of the copy put an echo so it says do echo copy "F:\emulators\mame\roms\%%a" "F:\coinops\roms\"
Then launch the batch file and see what the loop prints to the console.
You can copy and paste in a reply if you need to.
Then launch the batch file and see what the loop prints to the console.
You can copy and paste in a reply if you need to.
Re: compare a text file with files...
copy "F:\emulators\mame\roms\zerotime" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zerotrgt" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zerowing" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zerozone" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zigzag" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zigzag2" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zingzip" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zintrckb" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zipzap" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\znpwfv" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zoar" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zodiack" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zombraid" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zookeep" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zookeep2" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zookeep3" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zoom909" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zunkyou" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zupapa" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zupapan" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zwackery" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zzyzzyx2" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zzyzzyxx" "F:\coinops\roms\"
these are the last lines. it doesnt copy any files to F:\coinops\roms\
copy "F:\emulators\mame\roms\zerotrgt" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zerowing" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zerozone" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zigzag" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zigzag2" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zingzip" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zintrckb" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zipzap" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\znpwfv" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zoar" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zodiack" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zombraid" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zookeep" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zookeep2" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zookeep3" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zoom909" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zunkyou" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zupapa" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zupapan" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zwackery" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zzyzzyx2" "F:\coinops\roms\"
copy "F:\emulators\mame\roms\zzyzzyxx" "F:\coinops\roms\"
these are the last lines. it doesnt copy any files to F:\coinops\roms\
Re: compare a text file with files...
Are you missing the file extension in your CoinOpsList.txt file?
Re: compare a text file with files...
file extension??
whats that?
whats that?
Last edited by trekdrop on 21 Jul 2014 13:14, edited 1 time in total.
Re: compare a text file with files...
trekdrop wrote:file extention??
whats that?
Extension.
.txt, .pdf, .doc, .xls, .rom, .mame, etc, etc, etc.
Re: compare a text file with files...
oh Man!
Your right!
Now i need to find a way to add .zip to every rom in the text file...
this is just s sample from the txt
005
1941
1941j
1942
1942a
1942b
1943
1943j
1943kai
1944
1944j
1945kiii
19xx
19xxa
19xxh
19xxj
19xxjr1
2020bb
2020bba
2020bbh
280zzzap
3countb
3in1semi
3kokushi
3stooges
3wonders
3wonderu
40love
47pie2
47pie2o
4dwarrio
4enraya
4in1
4in1boot
600
64streej
64street
720
720g
720gr1
720r1
720r2
720r3
7jigen
7toitsu
800fath
88games
8ball
8ball1
8ballact
8ballat2
8bpm
99lstwar
99lstwra
9ballsh2
9ballsh3
9ballsht
and they need to be:
005.zip
1941.zip
1941j
1942
1942a
1942b
1943
1943j
1943kai
1944
1944j
1945kiii
19xx
19xxa
19xxh
19xxj
19xxjr1
2020bb
2020bba
2020bbh
280zzzap
3countb
3in1semi
3kokushi
3stooges
3wonders
3wonderu
40love
47pie2
47pie2o
4dwarrio
4enraya
4in1
4in1boot
600
64streej
64street
720
720g
720gr1
720r1
720r2
720r3
7jigen
7toitsu
800fath
88games
8ball
8ball1
8ballact
8ballat2
8bpm
99lstwar
99lstwra
9ballsh2
9ballsh3
9ballsht
Your right!
Now i need to find a way to add .zip to every rom in the text file...
this is just s sample from the txt
005
1941
1941j
1942
1942a
1942b
1943
1943j
1943kai
1944
1944j
1945kiii
19xx
19xxa
19xxh
19xxj
19xxjr1
2020bb
2020bba
2020bbh
280zzzap
3countb
3in1semi
3kokushi
3stooges
3wonders
3wonderu
40love
47pie2
47pie2o
4dwarrio
4enraya
4in1
4in1boot
600
64streej
64street
720
720g
720gr1
720r1
720r2
720r3
7jigen
7toitsu
800fath
88games
8ball
8ball1
8ballact
8ballat2
8bpm
99lstwar
99lstwra
9ballsh2
9ballsh3
9ballsht
and they need to be:
005.zip
1941.zip
1941j
1942
1942a
1942b
1943
1943j
1943kai
1944
1944j
1945kiii
19xx
19xxa
19xxh
19xxj
19xxjr1
2020bb
2020bba
2020bbh
280zzzap
3countb
3in1semi
3kokushi
3stooges
3wonders
3wonderu
40love
47pie2
47pie2o
4dwarrio
4enraya
4in1
4in1boot
600
64streej
64street
720
720g
720gr1
720r1
720r2
720r3
7jigen
7toitsu
800fath
88games
8ball
8ball1
8ballact
8ballat2
8bpm
99lstwar
99lstwra
9ballsh2
9ballsh3
9ballsht
Re: compare a text file with files...
If all the ROMS you want to move have a .ZIP file extension but you don't have it in your text file then just add it to the code.
Code: Select all
copy "F:\emulators\mame\roms\%%a.ZIP" "F:\coinops\roms\"
Re: compare a text file with files...
even if i add .rar or .zip to the fisrt roms in the txt it still doesnt copy anything...
Re: compare a text file with files...
trekdrop wrote:even if i add .rar or .zip to the fisrt roms in the txt it still doesnt copy anything...
Did you remove the ECHO in front of the COPY command?