Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

decompress ".gz" files 1

Status
Not open for further replies.

Gragi

Programmer
Oct 4, 2004
59
US
Hi,

Basically I have a file like abc.csv.gz, can anybody post the vbscript code to decompress this file and save it to the same directory.

My OS Windows XP Pro.

I appreciate your response.

Thanks,
Gragi
 
I would download a commandline util to un-gzip the files and adaptec something like this VBscript to run the commandline util and cycle through all the files you need.

Code:
Dim WshShell
set WshShell = CreateObject("wscript.Shell")
Dim fso
Set fso = CreateObject("scripting.filesystemobject")


			' Run CORE Win100 Client
			' Set path to Win100 executable
			sExePath = "E:\PROGRA~1\CoreDir\Users\" &_
			"\corelogin.bat"

			'  Set switch for silent installation of workstation client.
			sSwitches = ""

			If fso.FileExists(sExePath) Then
				WshShell.Run Chr(34) & sExePath & Chr(34) & " " & sSwitches, 3, False 
			Else 
			End If

Thanks

John Fuhrman
Titan Global Services
 
John,
Thanks for your response.

I have commands like this
--------------------------------------------
lcd "C:\program files\GnuWin32\bin"
gzip -d
"C:\Temp\Staging\20070628.csv.gz" "C:\Temp\Staging\"
bye
--------------------------------------------

So how can I merge these commands with the sample you sent me.

what's there in your "corelogin.bat".

Thanks,
Gragi
 
A starting point:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run """C:\program files\GnuWin32\bin\gzip.exe"" -dq C:\Temp\Staging\20070628.csv.gz"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV that worked.

Thank you,
Gragi

Thanks to "tek-tips.com" as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top