Page 3 of 3 FirstFirst 123
Results 21 to 22 of 22

Thread: MD5 checksums for wbfs backups - master listing [please contribute]

  1. #21
    New Member
    Join Date
    Feb 2013
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by dniMretsaM View Post
    Here's a quick shell script that does the same thing. I ran it on Ubuntu, but it should work on most UNIX systems I believe:
    Code:
    #!/bin/sh
    
    find $@ -name "*.wbf*" | while read GAME
    do
        echo "*********************************************************
    $GAME -- begin verify"
        wit verify -vvv "$GAME"
    done
    echo "********************************************************"
    Usage: wit_script.sh [/path/to/WBFS/]

    If you don't put a path, it just searches from the working directory.
    Thanks for giving folks a nix option since I am pretty sure there is no way to run vbscript/wscript on the Mac side without some heavy translation compiler.
    I have been meaning to give myself a shot at trying Mono which is .NET on the Mac platform, so maybe if there is interest I would do it.

    I think unix find also has a way to query by date as well as I noticed it was missing the option I had to allow users to scan files that changed/added in last ## of days.

  2. #22
    Junior Member dniMretsaM's Avatar
    Join Date
    May 2010
    Location
    NE Ohio
    Posts
    1,142
    Thanks
    76
    Thanked 331 Times in 269 Posts
    Quote Originally Posted by matrixman1013 View Post
    I think unix find also has a way to query by date as well as I noticed it was missing the option I had to allow users to scan files that changed/added in last ## of days.
    That would be the -mtime option, I think. I'll add that in and post it here either tonight or tomorrow.

    EDIT: Here it is:
    Code:
    #!/bin/sh
    
    if [ $2 ]; then
        find $1 -name "*.wbf*" -mtime -$2 | while read GAME
        do
            echo "*********************************************************
    $GAME -- begin verify"
            wit verify -vvv "$GAME"
        done
        echo "********************************************************"
    else
        find $1 -name "*.wbf*" | while read GAME
        do
            echo "*********************************************************
    $GAME -- begin verify"
            wit verify -vvv "$GAME"
        done
        echo "********************************************************"
    fi
    Usage: wit_script.sh /path/to/somewhere/ [number]
    The number represents days. The number "2" would tell the script to check all games modified less than 2 days ago.


    I'm sure this could be condensed, but BASH scripting isn't really my thing so I'm not sure how. It'll get the job done, though. Note that you now have to put a path in, it's no longer optional. Use a . if you want to search from the working directory.
    Last edited by dniMretsaM; 02-08-2013 at 08:13 PM. Reason: Updated script.
    Quote Originally Posted by sven
    [16:26:34] i'm never sarcastic.
    [16:26:41] feel free to quote me on that.

Page 3 of 3 FirstFirst 123

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •