Search code examples
windowsbashterminalrar

Unrar all files from a folder using Windows terminal


I am looking for a command in the windows terminal that allows me to unrar all the files from a folder. Precisely I want to replicate this bash command on windows

find . -name "*.rar" -exec unrar x -o+ {} \;

thank u


Solution

  • I would prefer RS Finance's answer: a power shell provides an easy and clean solution. However, if that's not an option, you may achieve the same with command prompt like this (first cd to the correct directory),

    for %i in (*.rar) do "C:\Program Files\7-Zip\7z.exe" e "%i"
    

    I use 7z as my zip program. You just have to replace the path to whatever you use. If you have the path stored in you environment path, "7z.exe" without the absolute path may be enough.

    Note that,