How to run 7Zip via Batch
Posted: 01 Sep 2020 04:26
Dear all,
I'm working on a small .bat program which should do some small tasks in my testenvironment
One piece should be to zip all logfiles in a specific folder, using the 7Zip application
When I open a command box, walk through the folder (c:\program files\7-zip) and run the following command: 7z.exe a -tzip c:\temp\mylogs.zip c:\testenvironment\logs\*.log everything works absolutely perfect.
When I run my batch which includes this start "" "c:\program files\7-zip\7z.exe a -tzip c:\temp\mylogs.zip c:\testenvironment\logs\*.log" windows come up with an error saying windows cannot find c:\program files\7-zip\7z.exe a -tzip c:\temp\mylogs.zip c:\testenvironment\logs\*.log
Any ideas on how to resolve this ?
Thanks in advance
I'm working on a small .bat program which should do some small tasks in my testenvironment
One piece should be to zip all logfiles in a specific folder, using the 7Zip application
When I open a command box, walk through the folder (c:\program files\7-zip) and run the following command: 7z.exe a -tzip c:\temp\mylogs.zip c:\testenvironment\logs\*.log everything works absolutely perfect.
When I run my batch which includes this start "" "c:\program files\7-zip\7z.exe a -tzip c:\temp\mylogs.zip c:\testenvironment\logs\*.log" windows come up with an error saying windows cannot find c:\program files\7-zip\7z.exe a -tzip c:\temp\mylogs.zip c:\testenvironment\logs\*.log
Any ideas on how to resolve this ?
Thanks in advance