You are viewing our Forum Archives. To view or take place in current topics click here.
7zip extaxrt help!
Posted:

7zip extaxrt help!Posted:

--__--__--__--
  • New Member
Status: Offline
Joined: Jun 10, 201311Year Member
Posts: 31
Reputation Power: 1
Status: Offline
Joined: Jun 10, 201311Year Member
Posts: 31
Reputation Power: 1
What would be the batch file code to extract a .zip to a specified folder like C:\Users\User\Desktop\Test does the zip have to be in the same folder as the .bat?
#2. Posted:
UnrealEgg
  • Powerhouse
Status: Offline
Joined: May 30, 201014Year Member
Posts: 438
Reputation Power: 49
Status: Offline
Joined: May 30, 201014Year Member
Posts: 438
Reputation Power: 49
The following works for me:


7za x archiveToExtract.zip -oC:\Extract\Location\


However you must have the 7-Zip Command Line Version in the directory you're running the command from. Although saying that, you could also point to the exe and extract like so:


C:\7za.exe x archiveToExtract.zip -oC:\Extract\Location\


If you don't want to bundle the 7za.exe with the batch file as you know the machine has 7-Zip installed at a set location, you could do the following too:


"C:\Program Files\7-Zip\7z.exe" x archiveToExtract.zip -oC:\Extract\Location\


All the above commands were performed after cd to the location where archiveToExtract.zip was stored. You can either save the batch file in the same directory or tweak the above commands so a directory is included.
#3. Posted:
--__--__--__--
  • New Member
Status: Offline
Joined: Jun 10, 201311Year Member
Posts: 31
Reputation Power: 1
Status: Offline
Joined: Jun 10, 201311Year Member
Posts: 31
Reputation Power: 1
Thank you so much! Been stuck on this problem for the longest time!
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.