Is this even possible? Batch script to load each game once.
#1
I'm using Gzip for my ISOs and am wondering if there would be a way for somebody to help me with a script that would do the following in that order.

1. Open PCSX2.
2. Load the first game in a folder.
3. Once the game has loaded successfully, close PCSX2.
4. Launch it again.
5. Load the next game from within the same folder.

And on, and on, and on...

The reason? I want to create the index files for each game in one shot (instead of manually loading them all one-by-one)

Is there a way to do this via batch files and the like?

Sponsored links

#2
perhaps the autoit script was the best:
this following auto execute code :
HotKeySet("{ESC}","Solo_Switch")
If $CmdLine[0]==1 Then
;$AlcoholDir=@ProgramFilesDir & "C:\Program Files (x86)\Alcohol Soft\Alcohol 120"
$isocmd="C:\Program Files (x86)\UltraISO\drivers\isocmd.exe"
$xbmcDir="C:\Program Files (x86)\Kodi"
$Pcsx2Dir="H:\Programs\PCSX2"
$application="H:\Programs\Pcsx2\pcsx2-r5875.exe"
$ROM=$CmdLine[1]
ProcessClose("kodi.exe")
;RunWait(@ComSpec & ' /c axcmd 0: /m:' & '"' &$ROM& '"',$AlcoholDir,@SW_HIDE)
ShellExecuteWait($isocmd, ' -mount I: ' & '"' & $ROM & '"' )
Sleep(1500)
Run($application &" --nogui --fullboot --fullscreen --usecd")
WinActive("PCSX2")
While 1
Sleep(100)
WEnd
EndIf

Func Solo_Switch()
Run($Pcsx2Dir&"\pcsx2-killer.bat")
;;Run(@ComSpec & ' /c axcmd 0: /u',$AlcoholDir,@SW_HIDE)
ShellExecute($isocmd, ' -eject I: ')
Run($xbmcDir &"\kodi.exe")
WinWaitActive("Kodi")
Send("{F2}")
Exit 0
EndFunc
#3
Unfortunately, this doesn't seem to involve any kind of order running down a folder. Plus, it involves other apps. Beyond that, I can't make much of it.

What I need has probably never been done before, specifically. So I'm wondering if anybody has the ability to let me know if it's possible to craft such a script.
#4
one way for each game write a batch like this pcsx2 --nogui --fullscreen %game_iso_path%
#5
make a .bat file in windows and paste this inside of it and run it (dont forget to change the paths so they match where your stuff is kept). It opens each iso and waits 15 seconds..then it closes pcsx2 and opens the next one in the directory:

d:
REM (change this path to wherever your isos are)
CD "D:\Emulation\ROMS\PS2"
For /R %%G in (*.iso) do call :openiso "%%G"
goto :EOF

:openiso
ECHO %1
start "pcsx2-r5875" "C:\Program Files (x86)\PCSX2 1.2.1\pcsx2-r5875.exe" %1
TIMEOUT 15
taskkill /F /IM pcsx2-r5875.exe
GOTO :EOF
Intel Core i5-8600K @ 4.5 GHz
GeForce GTX 1080 SC2 Stock
ASRock Z370 Taichi LGA 1151 mobo
CORSAIR Vengeance LPX 16GB 2400 DDR4 RAM
SAMSUNG 970 EVO M.2 2280 500GB PCIe SSD
Indigo Xtreme Thermal Interface Material
Phanteks Enthoo Pro ES614P Black Steel Case
EVGA SuperNOVA 750 G2 220-G2-0750-XR PSU
Windows 10 64-bit
#6
Here is little program I just made just for the exercise.
When you start it,you have to do couple of things
1.Choose the pcsx2 path from the Browse button(once you choose the path,the button will be renamed to Run)
2.Right click on the list and choose "Add Games"
Choose the directory where your games are(I didn't added a sub directory support)and the program will add only gz files that don't have index created
3.Once the list is created,click on the Run button and the program will run every game one after another and check every 3 seconds if the index is created(if not,it will wait another 3 seconds)

I tested it with 5 games and it worked fine


Attached Files Thumbnail(s)
   

.rar   GZip Index.rar (Size: 339,25 KB / Downloads: 201)
#7
Wow!

Thank you SO much, guys!

This is nothing short of amazing! I'll definitely try those and provide feedback for sure. Be sure to check in 2-3 days. Smile
#8
(08-19-2015, 07:36 PM)vsub Wrote: Here is little program I just made just for the exercise.
When you start it,you have to do couple of things
1.Choose the pcsx2 path from the Browse button(once you choose the path,the button will be renamed to Run)
2.Right click on the list and choose "Add Games"
Choose the directory where your games are(I didn't added a sub directory support)and the program will add only gz files that don't have index created
3.Once the list is created,click on the Run button and the program will run every game one after another and check every 3 seconds if the index is created(if not,it will wait another 3 seconds)

I tested it with 5 games and it worked fine

I can confirm that everything works great! It runs flawlessly, in fact.

There were two gzipped games that were corrupted. What happens in that case is the emulator crashes and the entire index file creation process is stopped until somebody presses on the "Close" button. But no big deal since this was obviously my fault.

Thank you ever so much! You saved me so so so many hours!
#9
(08-19-2015, 07:36 PM)vsub Wrote: Here is little program I just made just for the exercise.
When you start it,you have to do couple of things
1.Choose the pcsx2 path from the Browse button(once you choose the path,the button will be renamed to Run)
2.Right click on the list and choose "Add Games"
Choose the directory where your games are(I didn't added a sub directory support)and the program will add only gz files that don't have index created
3.Once the list is created,click on the Run button and the program will run every game one after another and check every 3 seconds if the index is created(if not,it will wait another 3 seconds)

I tested it with 5 games and it worked fine

Is there an updated version by any chance? This one doesn't list directories in Windows 10. Only shows Desktop regardless of where you place it
#10
The most recent post in this thread is more than 8 months old. Please create a new thread and refrain from posting in threads older than 8 months in the future. Please also review the forum rules. Thank you.
CPU : AMD Ryzen 7 3800X
Mobo : Asus PRIME B450-PLUS
GPU : NVIDIA GeForce RTX 3070
RAM : 16 Go




Users browsing this thread: 1 Guest(s)