Unzip .gz file in windows batch script using 7zip

0

I have 7 zip installed on windows machine. I have to extract .gz files into .txt files. I am not able to find a suitable command to do that. I tried below :

7za e %SFTP_INDIR%\DFUView.20150531060116.gz -o D:\Batch\Batch_FWK\data\in\DFUView.txt

Got errors using this - '7za' is not recognized as an internal or external command,operable program or batch file. Need help.

Novice

Posted 2015-06-05T19:42:10.977

Reputation: 43

1Make sure 7za.exe is in your path, or in the directory in which you're running the command. – Karan – 2015-06-05T19:46:22.797

I tried with this command again :

D:\Batch\7-Zip\7z.exe %SFTP_INDIR%\DFUView.20150531060116.gz -o D:\Batch\Batch_FWK\data\in\DFUView.txt

and this gave error :

Command Line Error: Too short switch: -o – Novice – 2015-06-05T20:09:45.273

You've specified a switch for 7z but where's the command? Type 7za /? or read the manual. – Karan – 2015-06-05T20:25:55.993

No answers