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

WinRAR

Options
  • 28-05-2008 2:24pm
    #1
    Closed Accounts Posts: 289 ✭✭


    Not really a programming question but I want to
    parse a folder and all it's subfolders and uncompress all the .gz files,

    I know WIN RAR has a command line tool but the help file is pretty basic,
    and most online tutorials are for the unix/linux version...

    any good tips or links to tutorials on how to write such a script ?


Comments

  • Closed Accounts Posts: 289 ✭✭berengar


    OK i can use a batch file for this ...

    but the for syntax in batch files is ... well not great ...

    for example this doesn't work and it should:

    for /r C:\temp\rar_test %%X in (*.rar) do ( unrar e *.rar)


    that should unrar all .rar files in c:\temp\rar_test and the subfolders ... it just unzipps the files in the rar_test folder .. not the subfolders...


  • Registered Users Posts: 1,996 ✭✭✭lynchie


    berengar wrote: »
    OK i can use a batch file for this ...

    but the for syntax in batch files is ... well not great ...

    for example this doesn't work and it should:

    for /r C:\temp\rar_test %%X in (*.rar) do ( unrar e *.rar)


    that should unrar all .rar files in c:\temp\rar_test and the subfolders ... it just unzipps the files in the rar_test folder .. not the subfolders...

    AFAIK e extracts to current directory, x extracts with full path.


  • Closed Accounts Posts: 289 ✭✭berengar


    no this is a problem witth the syntax of the batch ..

    I see the unrar x -r *.rar command will recursively go through all the subfolders ...

    stupidly though it unzipps all files to the root directory and not the directory that the rar file is in ...

    stupid...


Advertisement