I want to compress selected files to a rar file:
the command for the button is like below
run "C:\WinRAR\winRAR.exe" "a" "<curfolder>-<date yyyymmdd>" "<items>", "<curpath>", s
It successfully compress file into a rar file <curfolder>-<date yyyymmdd>.rar
however, the each file in the rar has the full path. I just want to have relative path.
P.s. I posted a wish here.
http://www.xyplorer.com/xyfc/viewtopic.php?f=5&t=4227
toolbar button for WinRAR
-
zer0
- Posts: 2676
- Joined: 19 Jan 2009 20:11
Re: toolbar button for WinRAR
That question has nothing to do with XYplorer, it's to do with WinRAR and its command line switches.
I don't think there's a command line switch to only have relative paths, but there's a switch to exclude paths and that switch is "-ep". Of course the danger is that you may get two files with the same name. If that's not good enough, then you can archive them manually
I don't think there's a command line switch to only have relative paths, but there's a switch to exclude paths and that switch is "-ep". Of course the danger is that you may get two files with the same name. If that's not good enough, then you can archive them manually
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build
Windows 7/10
Always using the latest stable two-decimal build
-
paul0
- Posts: 137
- Joined: 23 Oct 2009 19:26
Re: toolbar button for WinRAR
thanks. the above way will also make the structure flat as well.zer0 wrote:I don't think there's a command line switch to only have relative paths, but there's a switch to exclude paths and that switch is "-ep". Of course the danger is that you may get two files with the same name. If that's not good enough, then you can archive them manually
Archive the relative path such that we can extra those files to some other place but keep the relative path.
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: toolbar button for WinRAR
I think there's like 4 different versions of '-ep'. I believe '-ep1' works a bit better and is probably the one paul's after.zer0 wrote:but there's a switch to exclude paths and that switch is "-ep". Of course the danger is that you may get two files with the same name. If that's not good enough, then you can archive them manually
-
paul0
- Posts: 137
- Joined: 23 Oct 2009 19:26
Re: toolbar button for WinRAR
Thanks, TheQwerty:-)TheQwerty wrote:zer0 wrote:... I believe '-ep1' works a bit better and is probably the one paul's after.
this command works perfectly.
openwith """C:\WinRAR\winRAR.exe"" a -r -ep1 <curfolder>-<date yyyymmdd> <items>", s
Thanks again.
-
paul0
- Posts: 137
- Joined: 23 Oct 2009 19:26
Re: toolbar button for WinRAR
here is a minor update of the command.
openwith """C:\WinRAR\winRAR.exe"" a -r -ep1 ""<curfolder>-<date yyyymmdd>"" <items>", s
I add double quotes into command in case the <curfolder> has some sapces in between.
openwith """C:\WinRAR\winRAR.exe"" a -r -ep1 ""<curfolder>-<date yyyymmdd>"" <items>", s
I add double quotes into command in case the <curfolder> has some sapces in between.
XYplorer Beta Club