Tek Info
asked on
Zip command line program
I would like to use a script to effectively copy data from one computer to a server, create a zip file, and password protected.
What would you suggest?
What would you suggest?
7-Zip is free and has command line options, including password
I would suggest to create the Zip on the computer and copy only the Zip to server.
Copying single files over network needs extra step to check whether one single file failed to be copied.
Also the one big block is better and faster copied then multiple small files.
Also the one big block is better and faster copied then multiple small files.
7-Zip is definitely the best free tool for this. There are lots of examples here on Experts Exchange showing how to use it in scripting situations, mostly BAT, but some VBS and PS1 too.
As mentioned compressing on the client will reduce the size of the data that you have to send to the server and perhaps speed up the process. Although naturally creating the ZIP file take some time too on the client to do the compression.
Is this just for backup purposes, or will you be unzipping it as soon as it gets oto the server?
»bp
As mentioned compressing on the client will reduce the size of the data that you have to send to the server and perhaps speed up the process. Although naturally creating the ZIP file take some time too on the client to do the compression.
Is this just for backup purposes, or will you be unzipping it as soon as it gets oto the server?
»bp
Compress-Archive is the built-in PowerShell cmdlet for this need. PS v3 and above, no third-party install required.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Echo echo echo...
I recommend 7ZIP instead - it's free and open source. Examples can be found here: https://www.dotnetperls.com/7-zip-examples
I recommend 7ZIP instead - it's free and open source. Examples can be found here: https://www.dotnetperls.com/7-zip-examples
Need more details:
»bp
- Detailed info about files to be zipped, all in one folders or several? subfolders? selected extensions or all?
- What zip utility do you want to use?
- Where will file be placed?
- Will password be in the BAT file, hard coded?
- Should the zip, or files be deleted afterwards?
- . . .
»bp