Advertisement

04.07.2008 at 05:21AM PDT, ID: 23301057
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Rar.exe results zip files that can not be opened with windows zip program

Tags: WinRar, Rar Command Line
Hi,

I'm using Rar.exe in a batch, like this:
"C:\Program Files\WinRAR\rar.exe" a -r "%1\File.zip" "%2\Dir" -x"%2\Dir\bin\Release\1.exe" -x"%2\Dir\bin\Release\2.config"  -ep -ap"NewDir"

It seems that the File.zip is not a regular zip and can not be opened by windows (using windows zip program) nor with any standard library (zip utilities). WinRar can open it.
Start your free trial to view this solution
Question Stats
Zone: Software
Question Asked By: breezback
Solution Provided By: RQuadling
Participating Experts: 1
Solution Grade: A
Views: 107
Translate:
Loading Advertisement...
04.07.2008 at 05:30AM PDT, ID: 21296149

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 05:44AM PDT, ID: 21296264

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 05:45AM PDT, ID: 21296278

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 05:49AM PDT, ID: 21296315

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 05:57AM PDT, ID: 21296369

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 06:17AM PDT, ID: 21296533

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 06:18AM PDT, ID: 21296540

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 06:24AM PDT, ID: 21296589

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 06:27AM PDT, ID: 21296616

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 06:43AM PDT, ID: 21296759

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 06:45AM PDT, ID: 21296780

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 06:46AM PDT, ID: 21296790

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 06:49AM PDT, ID: 21296825

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 06:51AM PDT, ID: 21296847

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 06:58AM PDT, ID: 21296907

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 06:58AM PDT, ID: 21296916

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 07:01AM PDT, ID: 21296954

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 07:01AM PDT, ID: 21296959

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 07:01AM PDT, ID: 21296960

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 07:03AM PDT, ID: 21296973

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 07:04AM PDT, ID: 21296978

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 07:05AM PDT, ID: 21296980

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 07:06AM PDT, ID: 21296997

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 07:07AM PDT, ID: 21297009

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2008 at 08:37AM PDT, ID: 21297934

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
04.07.2008 at 05:30AM PDT, ID: 21296149
Try adding an -afzip parameter and use Winrar and not Rar.

From the help ...

Switch -AF<type> - specify archive format
--------------------------------------------------------------------------------
This switch allows to define a type of new archive in WinRAR command line. <Type> parameter can be 'rar' or 'zip'.
For example, 'winrar a -afzip arc' will create arc.zip archive.
This switch is supported only by WinRAR. Console RAR is not able to create ZIP archives.
 
04.07.2008 at 05:44AM PDT, ID: 21296264
This way I lost the ability to set the path into the archive
meaning that the content will not be extracted to "NewDir" by default.
 
04.07.2008 at 05:45AM PDT, ID: 21296278
I thought perhaps there's a sfx that could help... but they all compress to .exe (self extract archive) and I need a regular .zip with folder inside.
 
04.07.2008 at 05:49AM PDT, ID: 21296315
ZIP files have a lot less flexibility than rars.

But ...

Switch -AP<path> - set path inside archive


--------------------------------------------------------------------------------


The path defined using this switch is merged to file names when adding files to an archive and removed from file names when extracting.

For example, if you wish to add the file readme.txt to the folder DOCS\ENG of archive release, you may run:

WinRAR a -apDOCS\ENG release readme.txt

or to extract ENG to the current folder:

WinRAR x -apDOCS release DOCS\ENG\*.*

Available for RAR and ZIP formats only.


What version of WinRar are you using?



 
04.07.2008 at 05:57AM PDT, ID: 21296369
WinRar 3.71 (trial version)
See the command I used the switch -ap"NewDir"
at the end, to put all the files into that folder. Is it ok?
According to what I saw it's a good file for WinRar (I see the folder inside it)
But Winzip can not open these .zip archives
 
04.07.2008 at 06:17AM PDT, ID: 21296533
C:\Batch>winrar a -apFred C:\arc *.bat -afzip
C:\>pkzip arc -vb

Searching ZIP: arc.ZIP

 Length  Method   Size  Ratio    Date     Time    CRC-32  Attr  Name
 ------  ------   ----- -----    ----     ----   -------- ----  ----
     28  Stored      28   0%  19-08-1997  20:06  bec50367 --wa  Fred/25.BAT
Comment:
     30  Stored      30   0%  19-08-1997  20:06  3c0b6de1 --wa  Fred/50.BAT
Comment:
    135  DeflatX    107  21%  20-11-2006  12:22  5d022f52 --wa  Fred/ABG.BAT
Comment:
    888  DeflatX    444  50%  12-03-2008  13:51  2d0094fb --wa  Fred/chop.bat
Comment:
   9839  DeflatX   2361  77%  02-01-2001  15:51  89b35773 --wa  Fred/CLEAN.BAT
Comment:
   2317  DeflatX    671  72%  10-08-2006  09:40  40f4ea14 --wa  Fred/Convert Triple C Data.bat
Comment:
     27  Stored      27   0%  09-11-2007  17:14  7fb8fe98 --wa  Fred/cy.bat
Comment:
   1352  DeflatX    576  58%  10-03-2005  09:42  850ab275 --wa  Fred/EmptyDirs.BAT
Comment:
   1016  DeflatX    457  56%  08-08-2006  14:39  c81c02c7 --wa  Fred/EVT.BAT


 
04.07.2008 at 06:18AM PDT, ID: 21296540
Can you create one and upload it? Use dumb files.
 
04.07.2008 at 06:24AM PDT, ID: 21296589
2008/04/07 14:23:04 C:\>pkware\pkunzip arc.zip -d

PKUNZIP (R)    FAST!    Extract Utility    Version 2.50    03-01-1999
Copr. 1989-1999 PKWARE Inc.  All Rights Reserved.  Registered version
PKUNZIP Reg. U.S. Pat. and Tm. Off.

Searching ZIP: ARC.ZIP
 Extracting: Fred/25.BAT
 Extracting: Fred/50.BAT
  Inflating: Fred/ABG.BAT
  Inflating: Fred/chop.bat
  Inflating: Fred/CLEAN.BAT
  Inflating: Fred/Convert Triple C Data.bat
 Extracting: Fred/cy.bat
  Inflating: Fred/EmptyDirs.BAT
  Inflating: Fred/EVT.BAT
  Inflating: Fred/Firefox Beta.BAT
  Inflating: Fred/join files.bat
  Inflating: Fred/Live Triple C.BAT
  Inflating: Fred/NCCC.BAT
 Extracting: Fred/OVER.BAT
  Inflating: Fred/phdb.bat
  Inflating: Fred/PHDUP.BAT
  Inflating: Fred/phpchm.bat
  Inflating: Fred/PHPLatest.bat
  Inflating: Fred/prodiff.bat
  Inflating: Fred/qt.bat
  Inflating: Fred/RARIT.BAT
  Inflating: Fred/RARUP.BAT
  Inflating: Fred/RBG.BAT
 Extracting: Fred/soff.bat
 Extracting: Fred/son.bat
  Inflating: Fred/soup.bat
  Inflating: Fred/SOV.BAT
  Inflating: Fred/SOV2.BAT
 Extracting: Fred/Starter.BAT
  Inflating: Fred/TestIM.bat
 Extracting: Fred/TOP20.BAT
  Inflating: Fred/Triple C V730.BAT
  Inflating: Fred/unert.bat
  Inflating: Fred/UnivDate.bat
 Extracting: Fred/UP.BAT
  Inflating: Fred/upxit.bat
  Inflating: Fred/VALID.BAT
  Inflating: Fred/ValidDev.BAT
 Extracting: Fred/ZIP.BAT
  Inflating: Fred/ZIPOK.BAT
  Inflating: Fred/ZIPU.BAT
  Inflating: Fred/ZIPUP.BAT


All looks OK to me.

Not sure about WinZip.

Using zip within explorer
 
04.07.2008 at 06:27AM PDT, ID: 21296616
Ha. I'm on XP with WinRar loaded. Also have PKZip and 7-zip

All read the files fine.
 
04.07.2008 at 06:43AM PDT, ID: 21296759
I can't upload zip via EE, do you have an email?
The thing is I compressed file from:
A\B\C\*.dll
I need the archive to extract by default to D\*.dll
I don't want my customer to see A\B\C paths
 
04.07.2008 at 06:45AM PDT, ID: 21296780
I did your sample and the file is fine (not corrupted) but the paths A\B\C are not relevant and I get D\A\B\C according to this:
"C:\Program Files\WinRAR\winrar.exe" a -r -ap"WCAgent" "%1\WCAgent.zip" "%2\NewAgent\bin\Release" -x"%2\NewAgent\bin\Release\NewAgent.vshost.exe" -x"%2\NewAgent\bin\Release\NewAgent.vshost.exe.config" -afzip
 
04.07.2008 at 06:46AM PDT, ID: 21296790
Just change dir to a\b\c before you zip.
 
04.07.2008 at 06:49AM PDT, ID: 21296825
Switch -EP - exclude paths from names


--------------------------------------------------------------------------------


With this switch, files are added to an archive without including the path information. This could result in multiple files existing in the archive with the same name.

Example
archive without paths all *.bas files from the current disk

WinRAR a -r -ep bsources \*.bas
 
04.07.2008 at 06:51AM PDT, ID: 21296847
oh right, let me see
 
04.07.2008 at 06:58AM PDT, ID: 21296907
Nope, still the same problem: I have the whole paths or no paths

rar this:
c:\dir1\dir2\dir3\*.* and put it in c:\arc.zip with a folder inside it: dir\file
so when you extract you get a directory 'dir' and a file 'file' inside.
 
04.07.2008 at 06:58AM PDT, ID: 21296916
Ah. -ep and -ap don't work together.

Use -ep1 to see it in operation.

I am emailing dev@rarlab.com with the problem. Maybe you should also.
 
04.07.2008 at 07:01AM PDT, ID: 21296954
but rar.exe can do it, winrar can't
 
04.07.2008 at 07:01AM PDT, ID: 21296959
can I use rar.exe with the same options?
 
04.07.2008 at 07:01AM PDT, ID: 21296960
If you change directory to either the containing folder, then -ap will work.
 
04.07.2008 at 07:03AM PDT, ID: 21296973
what do you mean?
 
04.07.2008 at 07:04AM PDT, ID: 21296978
I need to put it in a mapped drive it's not containing folder
 
04.07.2008 at 07:05AM PDT, ID: 21296980
No.

-afzip only works in winrar.

What about just using WinZip? Does it support anything like this?
 
04.07.2008 at 07:06AM PDT, ID: 21296997
CD \a\b\c
and then
winrar a -r -ap"NewDir" .......
Accepted Solution
 
04.07.2008 at 07:07AM PDT, ID: 21297009
ok
 
04.07.2008 at 08:37AM PDT, ID: 21297934
From RARsoft ...

=================
Hello,

Thank you for the suggestion.

Probably we'll change -ap behavior in WinRAR 3.80, so it will be
applied always, regardless of -ep[n] switches.

RAR development
=================


 
 
20080236-EE-VQP-29 / EE_QW_2_20070628