Need help with a script

Come up with a useful post-processing script? Share it here!
Post Reply
XvpX
Newbie
Newbie
Posts: 6
Joined: July 7th, 2009, 9:48 pm

Need help with a script

Post by XvpX »

I am looking to take the abgx360 script that outputs a html file and have it scan the html file to see if it is verified or not, then place the file in a verified folder if it passes or delete it if it fails. I'm a PC user with no bash skill and very limited bat file skill. I would really love help on this if you can spare the time. Thanks in advance.
markus101
Release Testers
Release Testers
Posts: 406
Joined: August 13th, 2008, 2:51 am

Re: Need help with a script

Post by markus101 »

This should help, I'm not sure if someone did a whole script for abgx360 and Windows, but this will do the checking part.

Code: Select all

findstr /c:"Verification was successful" "%1"
IF %errorlevel% EQU 0 (
ECHO File is OK
) ELSE (
ECHO Bad 360 ISO
rm -r "%1"
)
This will check a file named "abgx360.html" in the folder you pass to the script (after the script name"

For Example:

Code: Select all

C:\abgx360.bat "C:\Downloads\GameName"
Enjoy,

Markus

P.S. Isn't deleting a bit overkill? Sometimes the game just hasn't been added to the DB yet, seems like a waste of bandwidth/time to re-download it in those situations.
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
XvpX
Newbie
Newbie
Posts: 6
Joined: July 7th, 2009, 9:48 pm

Re: Need help with a script

Post by XvpX »

Deleting is a bit overkill, I thought of that after. Thank you I will try it out tonight and let you know.
Post Reply