Running WinRAR in a Command Line Window

Q

Running WinRAR in a Command Line Window

✍: Guest

A

WinRAR also support command line operations. This is important to allow users to incorporate WinRAR commands into automated scripts. Here is a simple script 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\*.*

The restore script is also very simple, restore.bat:
@rem restore.bat
@rem Usage: restore zipfile password
\local\winrar\winrar x -p%2 %1.zip .\

2008-10-07, 7505🔥, 0💬