Naming a Zip file the same as it's time stamp
Posted on 2009-12-18
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?