Author Posts

January 1, 2012 at 12:00 am

by tonyrobbins1978 at 2012-12-31 09:28:34

Hello

I have Windows 2008 Server with some GZ type files in a folder. I would like to script unzipping them using Powershell, can someone tell me if this is possible and how I would do it?

The folder is d:\data_files\ and I'd like to uncompress all the .gz files in there

I've searched around on the Net but can't find much that deals with GZ files specifically.

by nohandle at 2013-01-01 03:02:13

Here is some .NET function to show how to compress a file, refer to the MSDN documentation to rewrite it to meet your needs. http://wannemacher.us/?p=225

If that is too complicated for you, the 7-zip has commandline interface that can be used from powershell.

by riffy at 2013-01-14 23:55:48

The same questioned was posted here...

http://social.technet.microsoft.com/For ... 3a38ab93f5

I found the compression examples and created an uncompress function.