none
Batch file to run thru all DIR from an external HDD, start an extract process in each DIR and remove old files

    Question

  • Hello,

    i have 2 X 4tb HDD with about 1000 DIR in each of them. I need to extract files from .ISO files in each of the DIR, delete the wrongly extracted file already on the HDD.

    So i need a batch file to run thru all DIR, extract the file (it's a .exe) in each of the DIR, and then terminate when the last DIR is done. The extract program will need the .iso file name in a parameter from each DIR

    thx.

    • Moved by Bill_Stewart Tuesday, March 25, 2014 3:07 PM Unanswerable drive-by question
    Wednesday, October 30, 2013 6:01 PM

All replies

  • Hi,

    What have you tried so far?

    You may want to start your search here, if you haven't done anything yet:

    http://gallery.technet.microsoft.com/scriptcenter


    Don't retire TechNet! - (Maybe there's still a chance for hope, over 12,300+ strong and growing)

    • Proposed as answer by Chen VMVP Wednesday, October 30, 2013 6:47 PM
    Wednesday, October 30, 2013 6:04 PM
  • Hello,

    i have 2 X 4tb HDD with about 1000 DIR in each of them. I need to extract files from .ISO files in each of the DIR, delete the wrongly extracted file already on the HDD.

    So i need a batch file to run thru all DIR, extract the file (it's a .exe) in each of the DIR, and then terminate when the last DIR is done. The extract program will need the .iso file name in a parameter from each DIR

    thx.

    What is wrong ISO? How do we identify it? PowerShell will indeed terminate once the last DIR is done it has nothing to do after that.


    Regards Chen V

    Wednesday, October 30, 2013 6:49 PM
  • hi,

    the wrong iso are file that i need to delete as the HDD is almost full. I need to keep some of them and delete the one that i dont need. The deleted files would be replaced by newly extracted files, with the batch cmd.

    can this work with FORFILES /S /M *.iso /C "extraction program ..."   ?

    Friday, November 01, 2013 3:11 PM
  • To extract a file from an ISO you will need a third party tool unless you have WS2012 which can directly mount an ISO as a drive.  I also think that Windows 8.1 can mount an ISO.

    Once you have resolved that you can just copy the file from the ISO using the standard "copy" command.


    ¯\_(ツ)_/¯

    Friday, November 01, 2013 3:49 PM