Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MikeFromPA

Pages: [1]
1
Emulators / Re: Best Compression for Specific Emulators
« on: January 07, 2019, 03:06:20 PM »
Now, if someone would like to explain HOW  FOR /R %%A IN (*.zip) DO (
cycles through every file in the subdirectory, errr, folder, I'd love to know!  ( =

for = command
/r = recursive search (i.e. all subfolders)
%%a = variable that equals each file name
in = is used to specify the set of files you want to scan (*.zip in this case)
do = command/action to take on the files

It's nice not understanding how it works doesn't stop it from working. 😁

2
Emulators / Re: Best Compression for Specific Emulators
« on: January 05, 2019, 07:42:32 AM »
So I've been thinking *ALOT* about this thread, because I feel making sure you have good compressed files go hand in hand with converting their compression.

After almost a full day of searching, I've found the batch file I mentioned above, which uses 7zip to verify the file has no compression errors.  Was sitting, waiting for me on an external hd I had in storage.

cls
FOR /R %%A IN (*.zip) DO (
7za t "%%A" | FIND "Everything is Ok" || (DEL "%%A" & ECHO.%%A BAD >> error.log)
)

And this is what the error.log looks like.

G:\eXoDOS\Games\Lemonade Stand (1999).zip BAD
G:\eXoDOS\Games\Lorna (1990).zip BAD
G:\eXoDOS\Games\MicroLink Shut the Box (1989).zip BAD


Now, if someone would like to explain HOW  FOR /R %%A IN (*.zip) DO (

cycles through every file in the subdirectory, errr, folder, I'd love to know!  ( =

3
Emulators / Re: Best Compression for Specific Emulators
« on: January 04, 2019, 02:13:39 AM »
Any file extention to .zip (I'm using 7za.exe for these)

nes2zip.bat
Code: [Select]
for /r %%i in (*.nes) do 7za a -tzip "%%~ni.zip" "%%i"pce2zip.bat
Code: [Select]
for /r %%i in (*.pce) do 7za a -tzip "%%~ni.zip" "%%i"sms2zip.bat
Code: [Select]
for /r %%i in (*.sms) do 7za a -tzip "%%~ni.zip" "%%i"
Any file extention to .7z (I'm using 7za.exe for these)

nes27z.bat
Code: [Select]
for /r %%i in (*.nes) do 7za a -t7z "%%~ni.7z" "%%i"pce27z.bat
Code: [Select]
for /r %%i in (*.pce) do 7za a -t7z "%%~ni.7z" "%%i"sms27z.bat
Code: [Select]
for /r %%i in (*.sms) do 7za a -t7z "%%~ni.7z" "%%i"convert2chd.bat
Code: [Select]
for /r %%i in (*.cue) do chdman createcd -i "%%i" -o "%%~ni.chd
for /r %%i in (*.gdi) do chdman createcd -i "%%i" -o "%%~ni.chd
iso2cso.bat (for performance adjust the thread count for your system, since these files are large too many threads could cause unresponsiveness or overheating (i.e. adjust or remove the thread statement all together but expect for your system to be taxed to the max if you do))
Code: [Select]
for /r %%i in (*.iso) do maxcso "%%i" --threads=2 -o "%%~ni.cso

@progets Sorry to revive a dead post, but this batch script reminded me of one I saw maybe 10 years ago, and could never recreate.  Instead of recompressing the files, it used 7zip to check the compressed files for errors based on the errorlevel, then would delete the corrupted files and log the filenames into a text file of what all was deleted.

Any chance you could throw this old dog a bone and modify one of these scripts for me to do the same?

Pages: [1]