• Welcome to SCdev.org. Please log in.

Welcome to the new SCdev forums!

Looking for an app for the R4 ...

Started by darkuni, January 20, 2007, 11:21:17 AM

Previous topic - Next topic

darkuni

Alright, before I actually waste my own time trying to figure out a way to do this (or write my own app), I'm looking for a very specific tool.  So far, I haven't found it.

Here is what I'd like it to do:

- Select a bunch of clean, untrimmed ROMs that are Zipped in their own archives.
- Extract them all to a temp location.
- TRIM all the roms, and put them in a specified location (i.e. TF card)
- Optionally create a SAV file of the same name for each one from a dummy/foo SAV file and copy that over.

I've found some tools that do SOME of this - but they all have flaws in some arena (DS-X Manager was the closest, but it crashes like mad, forces you to use a folder called APPS, doesn't create SAV files, blah blah).

Thoughts?  Anyone?  Thanks!
hane R. Monroe,
Co-Host of Dual Screen Radio
My Hacking Page | My DS List

dantheman

You could probably accomplish all of this with a batch file if you can find a freeware comand-line unzipping program and a trimmer.  The save file would just be a simple matter of taking the name of the file (minus the extension) and copying the dummy save to the new location with the new name.

darkuni

Yeah, I'm working on a Directory Opus script to do it ... just waiting for the developer to get back to me on a couple of things ... then I'll be good to go.

Still, I've been meaning to learn VB.net ... maybe I'll take a stab at it.
hane R. Monroe,
Co-Host of Dual Screen Radio
My Hacking Page | My DS List

dantheman

Here you go, this might help you.  It wasn't too hard to make.
http://danthemanms.googlepages.com/UnzipAndTrimScript.zip
It won't be able to copy the files directly to your media card, but you can just copy them over manually once it's done.  Put your .zip files in the "zips" folder and hit go.bat for it to run.

I can make modifications to it if you'd like.  For instance, I could delete the .zip files once they're done extracting, or I could prevent it from copying the save file.  Just let me know.

ZAFDeltaForce

Quote from: "dantheman"Here you go, this might help you.  It wasn't too hard to make.
http://danthemanms.googlepages.com/UnzipAndTrimScript.zip
It won't be able to copy the files directly to your media card, but you can just copy them over manually once it's done.  Put your .zip files in the "zips" folder and hit go.bat for it to run.

I can make modifications to it if you'd like.  For instance, I could delete the .zip files once they're done extracting, or I could prevent it from copying the save file.  Just let me know.

Fantastic app! Thanks! May I make a request for you to add the "delete .zip files once they're done extracting" function? That would be great. Thanks again!

Koji

Simple bat files are nice ^_^ it's quite nice and I might have to steal it for my own personal use when my R4 eventually gets here... stupid websites saying they are back ordered but that they'll ship last friday when they didn't -sniffle-

I think everyone should be forced to learn the basics of command line tools when they go in to purchase a computer... Make it part of an overall test to make sure they aren't too stupid as it's stupid people that help propagate e-mail viruses and bother tech support with cup holder calls and somehow "deleting" their own computer.

dantheman

ZAFDeltaForce, if you right-click the batch file and click Edit, find the line that says
unzip.exe -o zips\*.zip -d temp

Right after that, create a new line and add this:
DEL /Q zips\*.*

I'll add this to the ReadMe and upload the updated version.

EDIT:  updated version uploaded.  Glad to hear that you like it.

EDIT 2:  I like how I spelled "updated" as "updaded"  =/

darkuni

After pounding away, once again, Directory Opus (the most awesome file manager on the planet) came to my rescue!  I now have a one click solution integrated into my daily use file manager.

If you aren't using Directory Opus yet for file management, I recommend you take a look at it (don't let the price tag fool you - it fills the shoes of like 10+ apps).  If you had it, you could paste this code directly to a toolbar and instantly have this new functionality.

Copy EXTRACT FILE HERE FORCE
sync:trim.exe {o|noext}.nds
delete *.nds quiet
rename *.nds.trimmed *.nds
Rename REGEXP PATTERN="(.*) \(..\).nds" TO="\1.nds" FROM="*.nds"
copy MOVE *.nds TO {dlgstring|Enter drive letter to copy to|e}:\


This requires you have TRIM.EXE somewhere in your system's PATH (such as WINDOWS or SYSTEM32 or just in the folder where you ZIP files are).

What this does is:

1) Queries you for which drive letter you want to write to (defaults to e - so you will want to change it to match YOUR microSD card's drive letter).
2) Extract all the ZIP files to the same folder, forcing any overwrites (no more pausing on file.nfo when it already exists).
3) Runs the TRIM.exe on each file (producing new xxxxx.nds.trimmed files)
4) Deletes the original xxxx.nds file extracted.
5) Renames all the .nds files to remove the country designation like (US), (EU), (JP), etc.  I hate that in my rom list.
6) Copies the newly trimmed, renamed files to your card.

Enjoy!
hane R. Monroe,
Co-Host of Dual Screen Radio
My Hacking Page | My DS List

darkuni

Also, I'll be adding the SAV file copy functionality soon as well - I'll probably create a full menu for this tool for Dopus, so that those of us with multiple flashcarts can copy SAV files over (if we need to - for like the X9, etc) or not for R4, etc.

I hope SOMEONE else can benefit from all the stupid effort I put into this :)
hane R. Monroe,
Co-Host of Dual Screen Radio
My Hacking Page | My DS List

ZAFDeltaForce

Quote from: "dantheman"ZAFDeltaForce, if you right-click the batch file and click Edit, find the line that says
unzip.exe -o zips\*.zip -d temp

Right after that, create a new line and add this:
DEL /Q zips\*.*

I'll add this to the ReadMe and upload the updated version.

EDIT:  updaded version uploaded.  Glad to hear that you like it.

Sweet. Hey dude, where did you learn how to do all these stuffs? Mind if you teach me?  :)

Perkele

Tnx, Dopus is great, I used to use it on my Amiga.

darkuni

My pleasure .... The PC version doesn't have A-REXX of course, but it has such a powerful scripting language, you can do pretty much ANYTHING with it.
hane R. Monroe,
Co-Host of Dual Screen Radio
My Hacking Page | My DS List

darkuni

For those wanting to see just what Dopus can do, read my review:

http://monroeworld.com/reviews/review.php?id=6
hane R. Monroe,
Co-Host of Dual Screen Radio
My Hacking Page | My DS List