Windows Tutorials - Herong's Tutorial Examples - Version 5.62, by Dr. Herong Yang
Running WinRAR in a Command Line Window
This section provides a tutorial example on how to run WinRAR in a command line window.
WinRAR also support command line operations. This is important to allow users to incorporate WinRAR commands into automated scripts. Here is a simple script I used to backup a directory, backup.bat:
@rem backup.bat @rem Usage: backup directory zipfile password \local\winrar\winrar a -afzip -r -p%3 %2.zip %1\*.*
My restore script is also very simple, restore.bat:
@rem restore.bat @rem Usage: restore zipfile password \local\winrar\winrar x -p%2 %1.zip .\
For complete description of the command line interface of WinRAR, see the WinRAR help document.
Table of Contents