I want to compress all HTM files in D:\HTM\
to an archive called comp.7z
which is created in D:\HTM\
directory, so I do the following:
7z a -o "D:\HTM" comp.7z "D:\HTM"
and get an error, exactly as below:
Error:
Incorrect command line
Why am I getting error, what is the correct way/syntax of using -o
switch?
I have tried:
7z a -o"D:\HTM" comp.7z "D:\HTM"
And:
7z a -o{"D:\HTM"} comp.7z "D:\HTM"
It creates comp.7z
in CWD.
7z a D:\Your\full\path\com.7z D:\HTM\*.htm
?Error:\nIncorrect command line
" is what the output was.7z
a little more loquacious. :-)-o
was one of my attempts to get desired output paths. Also try7z --help
& see the output, one of the line says ` -o{Directory}: set Output directory`.