Batch Extract Folder of *.iso
I'm trying to take a folder full of disc images (ISO) and create a subfolder for each ISO (using the ISO's name), mount the ISO, and copy all of the content into that folder. I need it to loop so it extracts all of the ISOs in the folder. So far I have
@echo off
for %%X in (*.iso) do if not exist "C:\Users\Administrator\Deskstop\ISO Extractions\%%~nX" (
echo creating directory "C:\Users\Administrator\Deskstop\ISO Extractions\%%~nX"
mkdir "C:\Users\Administrator\Deskstop\ISO Extractions\%%~nX"
) else (
echo directory "C:\Users\Administrator\Deskstop\ISO Extractions\%%~nX" already exists
)
I'm about as new as it gets so I'm not sure how to mount the drive and use xcopy to get in into the appropriate folder. Any help is appreciated.
Got what I needed to do with 7zip. Here is the code.
for /f "usebackq delims=" %%f in ( `dir /b /s *.iso` ) do 7z x "%%f" -o"%%~pf%%~nf"
This requires the 7z file in the directory of the *.iso files. It creates a folder with the ISO name and extracts each ISO to that folder.
Thanks @It Wasn't Me for pointing out that I didn't need to mount the ISOs if I used an unzipping program.