Windows – Commandline to zip a file using WinRar

command linecompressionwindowswinrar

I looked for the answers in the list and did not find any matching.

What is the commandline to zip a file using Winrar, and then move it to a particular folder?

Best Answer

Though I found no documentation for it, I did manage to use winrar from the command line. I used the following syntax:

winrar a archiveName file1 file2 ....

to create an archive, and

winrar x archiveName

to extract the files from it in the current directory.