0

I'm trying to create a zip archive by executing this command line :

"C:\Program Files\WinRAR\WinRAR.exe" a -afzip "C:\Users\toto\Desktop\file.zip" "C:\Users\toto\workspace\thing\trunk\chrome" "C:\Users\toto\workspace\thing\trunk\defaults"

The file.zip is created on the desktop as wanted but when I open the archive I find the whole path to access the chrome and defaults directories. It is "Users\toto\workspace\thing\trunk" I'd like to have directly my chrome and defaults directories as first nodes in the archive. Is is possible ?

user2302725
  • 463
  • 6
  • 20

3 Answers3

3

Add -ep1 switch to your command

MC ND
  • 69,615
  • 8
  • 84
  • 126
0

Just cd there first:

cd \Users\toto\workspace\thing\trunk

then make it

"C:\Program Files\WinRAR\WinRAR.exe" a -afzip "C:\Users\toto\Desktop\file.zip" chrome defaults
Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
0

It is interesting to read this question as about 50% of all answers given on questions tagged with the WinRAR tag contain either switch -ep or -ep1.

For example:

It looks like many WinRAR users prefer asking over searching or looking in help of WinRAR or reading command line documentation Rar.txt in program files directory of WinRAR.

It might be helpful to answer this frequently asked WinRAR related question already in winrar tag wiki.

Community
  • 1
  • 1
Mofi
  • 46,139
  • 17
  • 80
  • 143