Jump to content

batch file to extract each iso to the folder where the archive is loca


Recommended Posts

===== Post Nº 1 ======

I need to recurse into subfolders with winrar so I use the -r switch... winrar x -r *.iso. Now when I launch this command from c: and it finds the file abc.iso in c:folder1, it extracts the file to c: instead of c:folder1. The names of the subfolders will be unknown so I can't specify them. I have been using this script

@echo OFF

REM Extract the content of all .iso files in the current directory

for %%f in (*.iso) do winrar x "%%f"

DEL *.iso

RMDIR AUDIO_TS

REM Perform the same in all sub-directories

for /D %%d in (*) do cd %%d && call %0 && cd ..

This works but I was wondering if there was a way to do it using just winrar commands? I pieced this script together from different places and honestly don't know what half the stuff means. like %%F or the whole line for /D %%d in (*) do cd %%d && call %0 && cd ..

Any help with this would be greatly appreciated.

===== Post Nº 2 ======

Can anyone shed some light on this...

===== Post Nº 3 ======

no one know about batch files..... Am I in the wrong forum

?

Edited by Yzöwl
Please do not post multiple times without reply
Link to comment
Share on other sites


Don't launch the command from the "c:\"; winrar is assuming that is the location to extract to. cause a "cd" (change directory) to the directory you want it extracted to.

the batch command you are using are, in essence,

- extracting the files one-by-one from the root of the iso

- following the path of each folder (level-by-level) extracting as per the previous

%0 is the directory wher the batch file is being executed. %%f and %%d are variables (f=file, d=directory respectively). "cd.." changes to the next higher directory level.

Just try as I suggested. HTH

Link to comment
Share on other sites

no one know about batch files..... Am I in the wrong forum

?

I know all about batch commands, however you asked for WinRAR commands instead!

I you want a batch solution to your problem, I will be able to offer you assistance, however I'm not downloading software or their manuals in order to find out the application specific information you require.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...