Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Everyone,

in my system i have installed the WinRAR extraction method, but i have .cab files, i need to extract the .cab files completely. i need winrar command line options to extract the .cab files
something i have tried,

XML
<target name="extract.zip.32">
   <exec basedir="D:\WinRar" program="WinRAR.exe">
     <arg line="extract32 /e D:\cabfiles\32bits_PortalServer*.cab D:\cabfiles\32bits_PortalServer" />
   </exec>
 </target>


please help me to get the files extracted

your's friendly
Tilakraj
Posted

1 solution

- The command-line program to handle archives with WinRAR is rar.exe, not winrar.exe.

You should go to a command prompt, then cd to your WinRAR directory, and type rar /? to get the full list of arguments. Then modify your xml in consequence

- There is a typo in your XML: one should read D:\cabfiles\32bits_PortalServer\*.cab instead of D:\cabfiles\32bits_PortalServer*.cab.
 
Share this answer
 
v2
Comments
tilakmoger 23-Apr-14 9:42am    
I tried using 'rar' command but it shows an error ".. .cab is not a RAR archive". Same CAB file I can extract with windows utility but command line fails always. I don't understand why. Any inputs?
phil.o 23-Apr-14 10:00am    
rar.exe does not seem to handle .cab files, so.
Then you just have to use the mandatory tool for that: expand
Type expand /? at the command prompt to see a list of arguments.
tilakmoger 23-Apr-14 10:28am    
hi Phil.o
can i get one sample command to run through expand?
tilakmoger 23-Apr-14 10:40am    
hi phil.o,
i have tried that command, no error, but it's not moving at all and no extraction done. i have to terminate the command.
phil.o 23-Apr-14 11:14am    
Which command exactly did you run?
"expand /?" gives you everything you need to construct a valid command.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900