Wednesday, March 15, 2017

command line - Compress files on Windows Server 2003


Duplicate Questions



How to compress files with batch file?





Using compact.exe didn't do what I wanted. I'd like to have an archive file created so that the files can be retrieved. This is intended for backup purposes.



This question seems to be asked several times, but each time the response is to download a third-party command-line program (CLI) and add it to the path which will allow for command line access. However, this will not work due to the environment that I'm working in. Is there a way to compress a file and have the contents put in a backup archive file?



 -d /directory/to/compress "compressedContents.zip"
...
compressedContents.zip //now contains all /directory/to/compress contents


As an alternative, is there a way in PowerShell to compress a file?

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...