Question

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 ?

Was it helpful?

Solution

Try:

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
)
popd

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

Mona

OTHER TIPS

RAR syntax:

RAR <command>  [ -<switches> ]  <archive>  [ <@listfiles...> ] [<files...> ]  [ <path_to_extract\> ]

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

rar a -p0000 C:\backup.rar "drive:\some folder\*.*"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top