Solved

format of zip command - producing 2 results..

Posted on 2014-12-19
1
108 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 56

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…

628 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