Solved

format of zip command - producing 2 results..

Posted on 2014-12-19
1
105 Views
Last Modified: 2014-12-28
Script1:
set Date=%Date:~-4%_%DATE:~4,2%_%DATE:~7,2%
"C:\Program Files\7-Zip\7z.exe" a -tzip E:\BACKUP\DOSPNSLiveDeploy\DOSPNSLiveDeploy_%Date% E:\Backup\DOSPNSLiveDeploy\DOSPNSLiveDeploy_backup_*.bak
~~~
Script2:
set Date=%Date:~-4%_%DATE:~4,2%_%DATE:~7,2%
"C:\Program Files\7-Zip\7z.exe" a -tzip E:\BACKUP\bnscapp\bnscapp_%Date% E:\Backup\bnscapp\bnscapp_backup_*.bak

The zip files produced by script2 are good and 'normal', ie I can double click on the zipped file and it opens up..
but with the file produced by scipt1, if I double click the zipped file, it tells me
"The compressed (zipped) Folder is invalid or corrupted."

the syntax is the same.. any thoughts?
0
Comment
Question by:25112
1 Comment
 
LVL 53

Accepted Solution

by:
Bill Prew earned 500 total points
ID: 40509737
Run the first script from a command window, and see what error or warning messages it displays when doing the ZIP.  The syntax looks okay as you have it, but perhaps it can't find any files, or is getting an access error, or a folder doesn't exist, etc.  7ZIP should give you feedback at the command prompt when you run it.

~bp
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OfficeMate Freezes on login or does not load after login credentials are input.
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question