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?
|
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? | ||||
|
feedback
|
This question came from our site for professional and enthusiast programmers.
|
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. | |||||
feedback
|
|
WinRAR cannot be used from the command line, use RAR instead. rar.exe (unlike WinRAR) cannot be used to create a zip archive. for all possible RAR commands and switches refer to help (rar /?) but here's how to use zip and unzip on the windows command line. | |||||||||
feedback
|
|
Per sqlsavvy's post on StackOverflow, it is possible to do using winrar.exe from the command line.
I confirm this works, however it pops up a gui progress bar during compress, instead of providing command line output. | ||||
|
feedback
|
|
You could use these add the folder "c:\latest data" to archive D:\Archives\Info.rar
add the folder "c:\latest data" and subfolders to archive D:\Archives\Info.zip
Note that WinRAR will use the archive extension (zip or rar) to decide the resulting archive format or you can use the switch above. WinRAR can be used fully in command line mode and there are a lot of command and switches for example you could add -ibck to avoid the progress bar. Also WinRAR will set the errorlevel to 0 for no errors, 1 for warnings and 2+ to signal several errors to ease the usage in batch files or scripts. All of this is explained in WinRAR help. | |||
|
feedback
|
.zipfile. – Daniel Andersson Mar 29 at 13:51