Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Loop through ISO files and extract

Options
  • 22-09-2012 5:44pm
    #1
    Registered Users Posts: 386 ✭✭


    Hi All,

    I have approx 100 ISO files on a NAS that I want to extract into the same folder, once finished the extraction delete the iso file, and move onto the next folder/ file.

    Is there any software that is available to do this? Or could some one assist in writing some code - can it be done in VBA?

    Thanks in advance,

    SH


Comments

  • Moderators, Technology & Internet Moderators Posts: 11,011 Mod ✭✭✭✭yoyo


    Hi All,

    I have approx 100 ISO files on a NAS that I want to extract into the same folder, once finished the extraction delete the iso file, and move onto the next folder/ file.

    Is there any software that is available to do this? Or could some one assist in writing some code - can it be done in VBA?

    Thanks in advance,

    SH

    Many archive programs (Winrar, 7zip etc.) support iso extraction, you may be able to find a command line version of these programs that would do this :)

    Nick


  • Closed Accounts Posts: 152 ✭✭rubadubduba


    POWERISO
    http://www.poweriso.com/download.htm
    should help also.


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 91,079 Mod ✭✭✭✭Capt'n Midnight


    interesting

    7za does NOT support .iso :(


  • Registered Users Posts: 1,931 ✭✭✭PrzemoF


    What's you linux knowledge? That shouldn't be too hard...
    Pseudo code (it's actually quite close to something that should work as a bash script):

    for file in *.iso
    mkdir $file.dir
    mkdir f$ile.dirdest
    mount -o loop -t iso9660 $file $file.dir
    copy $file.dir to $file.dirdest
    unmount $file.dir
    rm $file
    done


  • Registered Users Posts: 1,931 ✭✭✭PrzemoF


    A working bash script:

    for i in `ls *.iso`
    do
    mkdir $i.dir
    mkdir $i.dirdest
    mount -o loop -t iso9660 $i $i.dir
    cp -r $i.dir/ $i.dirdest/
    umount $i.dir
    rm $i
    rmdir $i.dir
    done


    run with sudo

    I'M TAKING NO RESPONSIBILITY FOR POTENTIAL DAMAGE CAUSED BY THIS SCRIPT, but it works for me. Depending on how the content of the isos is arranged (root dir files vs. no root dir files) you may want to change the destiantion in 'cp' command.


  • Advertisement
  • Registered Users Posts: 3,528 ✭✭✭SickBoy


    I had to extract a lot of large rar archives before. What I did was search for the files *.rar then highlight the results and right click and the context menu has an option, "extract all". This assumes you have winrar installed. The same procedure should work for a search for *.iso and extract all.


  • Registered Users Posts: 386 ✭✭SparrowHawk


    Hi All,

    many thanks for your responses - very much appreciated. I neglected to say that I'm running a Win 7 system ( not to mention that my Linux knowledge extends to spelling the name!!).

    @Sickboy - I'm actually in the process of trying this as you posted - my issue is that I'm stuck for space, so cannot afford to have all the ISO files and extracted files, exist at the same time - which is where the need to delete the ISO before progressing to the next file arises.

    I'll post back with success or fail!

    Again, thanks to all


  • Registered Users Posts: 6,213 ✭✭✭bonzodog2


    Do you need to have them all extracted? Why not just mount the ISO as a virtual drive with something like PowerISO?


  • Registered Users Posts: 386 ✭✭SparrowHawk


    @bonzodog2 - when I created the ISOs some of the settings are causing issues when I try to play on my media player - easiest way for me is just to extract the files.

    SickBoy - I have an "Extract Here" option which just causes all the folders to be extracted to the one location :-(


  • Moderators, Technology & Internet Moderators Posts: 11,011 Mod ✭✭✭✭yoyo


    @bonzodog2 - when I created the ISOs some of the settings are causing issues when I try to play on my media player - easiest way for me is just to extract the files.

    SickBoy - I have an "Extract Here" option which just causes all the folders to be extracted to the one location :-(

    Try the WinRAR "Extract each archive to a seporate folder" option. Winrar may create a folder based on the file name in this instance

    Nick


  • Advertisement
  • Registered Users Posts: 3,528 ✭✭✭SickBoy


    SickBoy - I have an "Extract Here" option which just causes all the folders to be extracted to the one location :-(

    There should be an option for "Extract Files" also. This option will give you the choice of location where you want the file to be extracted to.

    If space is an issue then maybe batch the job into 5 - 10 ISOs at a time and once you can confirm that the files have been extracted as expected then delete the ISOs and move on to the next batch, rinse & repeat as necessary.


  • Registered Users Posts: 6,213 ✭✭✭bonzodog2


    It would be quicker to add the drive as a slave drive inside a PC, then you are not reading the ISO and writing the contents back and forth across the network. Failing that, attach via USB.


  • Registered Users Posts: 386 ✭✭SparrowHawk


    Success!!

    I used "Extract Files" with the option selected to delete archives after extraction - all going according to plan :-D

    Thank you to all for your help and advice,

    SH


Advertisement