troubleshooting Question

Naming a Zip file the same as it's time stamp

Avatar of Bob
BobFlag for United States of America asked on
Windows BatchVB Script
3 Comments1 Solution321 ViewsLast Modified:
I am zipping files that are "X" number of days old, but I need to name that zip file the same as the date the time stamp is. Such as I want to name zip files that are five days older than today. I am using PKZIPC to zip these files and my command line is; pkzipc -add Original_%date:~4,2%%date:~7,2%%date:~10,4%%-5% C:\PKZip\TEST\*.*  In the command the zip file name is set to name the file to the current date. Is there a switch that can be used to name the file to a name that would be 5 or 4 days before the current date. Such as today is 12192009 and I want the zip file to be named 12142009. Is there a switch that I can use with the %date:~4,2%%date:~7,2%%date:~10,4%%-5% format that will name the zip file as that older date?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros