Take the 2-minute tour ×

I want to archive files in a folder by winrar.

I only can archive one file using rar a -p0000 C:\backup\ C:\backup\test.txt

How can I archive files in a folder ?

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted


rar a -p0000 C:\backup\ C:\backup\*

If rar.exe does not accept that then (firstly its crap, and you should GET RID OF IT) and secondly you can use:

pushd "C:\backup\"
for /r %%a in (*) do (
rar a -p0000 C:\backup\ C:\backup\%%a

And that should work just as fine. If thats not what your looking for or that doesn't work, please say so.


share|improve this answer
Thanks. I use rar a -p0000 C:\backup\ C:\backup\* and it works. –  CYB Sep 10 '13 at 14:02
add comment

RAR syntax:


I can't identify <archive> in your command line. Wouldn't it be:

rar a -p0000 C:\backup.rar "drive:\some folder\*.*"
share|improve this answer
add comment

Your Answer


