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?
PowershellWindows Batch* zipped filesScripting Languages
Last Comment
Bill Prew
8/22/2022 - Mon
NVIT
7-Zip is free and has command line options, including password
Zvonko
I would suggest to create the Zip on the computer and copy only the Zip to server.
Zvonko
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.
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
Michael B. Smith
Compress-Archive is the built-in PowerShell cmdlet for this need. PS v3 and above, no third-party install required.