Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need a batch script that will zip up all files in a particular directory and save it to another directory in a YYYY/MM/DD-HH/MM/SS format.

I've seen things similar but not sure about this.


share|improve this question

As I remember the date facilities in a batch script are tricky and limited. I made an antivirus updater script for a BartPE disk a while back and it took me quite a while to get it to be able to determine if the last update was older then a month. you may need to have the archive program input the full date/time for the file name. I am pretty sure that some of the utilitys out there will have that ability you may have to use a different program or type of archive though. If you use something like VB to do the backup it will be easier to set the date up and is not to hard to figure out for that type of a task.

also another thing to think about is if files will be locked due to use when you run the backup.

I will post the code i used in batch monday when I can look at it at work.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .