I'm referring to the profiles visible in the GUI version of the application. Can these be accessed via command line? I'm trying to create a RAR file via scheduled batch script. Thank you very much.
Asked
Active
Viewed 5,068 times
2

Slbox
- 10,957
- 15
- 54
- 106
-
@Slbox- any specific reason using the profile to create scheduled archive using 'rar' 'command line' in batch. – Gourav Dec 05 '17 at 07:28
-
1@Slbox The manual of console version `Rar.exe` is the text file `Rar.txt` in program files folder of *WinRAR* which can be read by simply double clicking on it. The console version does not support compression of files using a profile stored in Windows registry. The manual for GUI version `WinRAR.exe` is its help. Start *WinRAR*, open __Help - Help topics__, open in __Contents__ tree item __Command line mode__ and use the information in the listed pages. On creating a `WinRAR.exe` command line it is best to use the __Alphabetic switches list__ page. – Mofi Dec 05 '17 at 09:48
1 Answers
4
As per documentation provided in WinRAR manual use -cp <name>
switch to select compression profile.
Here is a cite from the documentation:
Using this switch you can load settings stored in WinRAR compression profile. You need to specify a profile name as switch parameter. If profile stores selected file names, WinRAR will compress both files specified in the command line and stored in profile. If profile contains an archive name, it will be used in archiving and you should not specify another archive name in command line.
Archive *.txt files using settings from "My Texts" compression profile by using:
WinRAR a "-cpMy Texts" texts *.txt

miradham
- 2,285
- 16
- 26
-
Why do you reference a *WinRAR* manual on a third-party page instead of the manual installed with *WinRAR* which definitely always fits to the user's installed version of *WinRAR*? – Mofi Dec 05 '17 at 09:50