Am I able to get a script or command to unzip.

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
tweacle
Posts: 71
Joined: 11 Apr 2018 05:38

Am I able to get a script or command to unzip.

#1 Post by tweacle » 25 Apr 2018 12:48

Hi

I have a 7 zip file that I need to unzip but not save it to personal computers but a folder on the server.

Im trying to make is easy so just a click on a icon and Im thinking of a script or command that someone clicks on and asks what subfolder they want to open within the folder and then asks for password thats on the subfolder and unzips as a complete folder to a specific location.

The script or command will always be in the folder so people can just click on it to open files. If 7 zip is difficult I can use the zip function in windows .

Im very rusty on .DOS so any reply in easy english would help.

Folder is C:\Downloads and there will be zipped sub folders within of which I need to unzip etc. They need to unzip to R:\DOWNLOADS

Has anyone any ideas or other suggestions?

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Am I able to get a script or command to unzip.

#2 Post by ShadowThief » 25 Apr 2018 21:23

You have been given the solution multiple times in multiple topics.
Last edited by ShadowThief on 27 Apr 2018 03:49, edited 1 time in total.

tweacle
Posts: 71
Joined: 11 Apr 2018 05:38

Re: Am I able to get a script or command to unzip.

#3 Post by tweacle » 26 Apr 2018 02:35

WTF RTFM????

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Am I able to get a script or command to unzip.

#4 Post by penpen » 27 Apr 2018 03:50

tweacle wrote:
25 Apr 2018 12:48
They need to unzip to R:\DOWNLOADS
It seems that the folder server is already mounted to your computer, so for that case siberia-man gave you the answer before:
siberia-man wrote:
20 Apr 2018 19:34
7za -h wrote:

Code: Select all

  -o{Directory}: set Output directory
Or in other words:

Code: Select all

7z x yourArchive.zip -o"R:\DOWNLOADS"
penpen

JMan
Posts: 5
Joined: 18 May 2018 08:26

Re: Am I able to get a script or command to unzip.

#5 Post by JMan » 18 May 2018 09:10

Unzipping can you do witch python 3.x.x.

Just create a script:
Example.py:

Code: Select all

import zipfile
zip_ref = zipfile.ZipFile("Yourzip.zip", 'r')
zip_ref.extractall()
zip_ref.close()
python: https://www.python.org/

more info:
https://docs.python.org/2/library/zipfile.html

Post Reply