Solved

format of zip command - producing 2 results..

Posted on 2014-12-19
1
103 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 52

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Article by: Lee
Windows 7 Ultimate and Enterprise (and 2008 R2) introduced a new feature you may not be aware of - Boot from VHD.   Boot from VHD (or what Microsoft refers to asNative Boot allows you to install Windows to a VHD (Virtual Hard Disk) file that is t…
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
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.

932 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now