Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # put this file and xbiso.pl in the directory with your xbox game folders
- # warning, this code does not handle spaces in file or directory names
- # No CRC, no clean up, no log
- startdir=`pwd`
- for f in `find . -type f`
- do
- foundpath=`dirname $f`
- foundname=`basename $f`
- # will find *.001 or *.rar, including *part01.rar or *part001.rar
- # but never "part", proceeded by a number greater then 01 or 001, then ending in ".rar"
- if [[ $foundname = *.rar || $foundname = *.001 ]]; then
- if [[ $foundname = *part01.rar ||
- $foundname = *part001.rar ||
- $foundname = *.001 ||
- $foundname = !(*part[0-9][0-9]|*part[0-9][0-9][0-9]).rar ]]; then
- cd $startdir/$foundpath
- currentdir=${PWD##*/}
- echo "FOUND! $currentdir"
- echo "Unpacking rar..."
- unrar x -inul $foundname
- # rename iso, will be the same name as the parent dir
- echo "Renaming iso..."
- mv $isofile $currentdir.iso
- echo "----------------"
- fi
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment