I have read RAR a folder without persisting the full path
which helps about the RAR -ep1
switch but I still have the following problem:
I want to add the directory D:\Temp\FolderA
and its subdirectories/files to a RAR archive:
D:\Temp\FolderA\A1
D:\Temp\FolderA\B2
D:\Temp\FolderA\C3\D4\E5.txt
... but with a custom name in the archive instead of FolderA
. Inside the RAR archive, it should look like this:
BaseFolder\SubDir\OtherName\A1
BaseFolder\SubDir\OtherName\B2
BaseFolder\SubDir\OtherName\C3\D4\E5.txt
I tried:
rar a -r test.rar D:\Temp\FolderA
but obviously the name FolderA
appears in the RAR package, which I don't want.
How is it possible with RAR?
Note: If possible, I'd like to avoid to temporary rename D:\Temp\FolderA
into D:\Temp\BaseFolder\SubDir\OtherName
, and avoid to create temporary symlinks.