The command line syntax for using the -sp switch with a rarsfx installer which contains another setup installer that can take switches is as follows: rarsfx.exe -sp' switch' where 'switch' is the argument you want to pass on to the embedded installer. Getting a winrar SFX to make an accurate shortcut to.exe in user-defi Facebook; Twitter. Name 'WinRAR archiver' and icon winrar.ico: Shortcut=D, winrar.exe, WinRAR, 'WinRAR executable file', 'WinRAR archiver', winrar.ico. The WinRAR documentation for the very tricky shortcut command line is completely deficient. Also, problematic, is.
Active5 years, 9 months ago
I want to create a folder in a RAR file and then add a file inside that folder. What commands should be issued to create a structure as follows?
I am trying to use this command:
However it does not work and says that rar.exe/folder not found. The help file does not show a way to add a folder or directory inside an archive.
Shekhar4,52833 gold badges2929 silver badges4646 bronze badges
Apoorv SaxenaApoorv Saxena
migrated from stackoverflow.comAug 20 '11 at 23:15
This question came from our site for professional and enthusiast programmers.
2 Answers
![Mistletoe Mistletoe](https://www.isunshare.com/blog/wp-content/uploads/2015/05/choose-files-to-create-sfx-winrar.png)
You don't want the sfx switch, because you are adding to an existing SFX archive. Thus your command should be along the lines of:
Where file.exe is your existing SFX archive and the last parameter is the path to the file or directory you wish to add.
Command Line Navigation
Mark Schadler
I think I found the solution: you should use the
James P-ep1 -apFolderYouWant
parameter. This creates a folder called FolderYouWant inside the rar archive and put the files you determined in it.8,91355 gold badges3434 silver badges4848 bronze badges
alperalper
Not the answer you're looking for? Browse other questions tagged command-linerar or ask your own question.
Command linesyntax
It is possible to perform WinRAR commands from the command line.Common command line syntax is described below:
WinRAR <command> -<switch1> -<switchN> <archive><files..> <@listfiles..> <path_to_extract>
Command | Character combination specifying the function to be performedby WinRAR.See the list of WinRAR commands here. |
Switch | Switches are used to define a specific type of operation,compression strength, type of archive, etc.See the list of WinRAR switches here. |
Archive | The name of the archive to process. |
Files | The name(s) of files to be processed. |
Listfiles | Listfiles are plain text files that contain names offiles to process. File names should start at the first column. It ispossible to put comments to the listfile after // characters. For example,you may create backup.lst containing the following strings: c:workdoc*.txt//backup text documents c:workimage*.bmp//backup pictures c:workmisc and then run: Serial wire debug. winrar a backup @backup.lst You may specify both usual file names and list files in the samecommand line. |
Path_to_extract | Used only with commands e and x, indicating the folderin which to place extracted files. If this folder does not exist, itwill be created. |
a) If neither files nor listfiles are specified,then *.* is implied and WinRAR will process all files;
b) If archive extension is not specified when creating an archive,WinRAR will use the default archive format selected in the defaultcompression profile, but you may overrideit by specifying either .rar or .zip extension.
If no archive extension is specified when extracting, WinRAR assumes .rar,so * means all archives with .rar extension. If you need to process allarchives without extension, use *. mask. *.* mask selects all files.You can use wildcards in archive name in most operations, such as extraction,test and many others, but wildcards are not allowed when archivingand deleting.
c) Switches entered on the command line override the same configurationsettings;
Command Line In Windows 7
d) For commands c, e, s, t, rr, k and x wildcardsmay be used in the archive name. Thus it is possible to process morethan one archive with a single command. Moreover, if you specify -r switch with these commands, they willsearch for archives in subfolders;
e) Some commands and switches are applicable only to RAR archives,some both to RAR and ZIP and someto all archive formats. This is dependent upon the functionality providedby the archive format;
f) Commands and switches are not case sensitive, you may writethem both in upper and in lower case;
g) If any component of command line contains spaces, enclose itto quotes.
- add the folder 'c:latest data' to archive Info.rar
WinRAR a Info.rar 'c:latest data'
Rar Sfx Command Line Icon Mistletoe 2017
- unpack the archive Info.rar to folder d:data
WinRAR x Info.rar d:data