How to define a batch script that saves working documents into dated folders

How to define a batch script that saves working documents into dated folders

I am trying to define a batch file that on a daily basis will create a folder on a backup drive based on the date. If I were to manually do this, I would go into the root directory of the secondary drive, make a directory (called something like "backup xx_xx_xxxx"), change directories into this folder, go back to the root of C, then run the backup. Is there a wild card of sorts that would insert a given date into this example?

    Requires Free Membership to View

    By submitting your registration information to SearchWindowsServer.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchWindowsServer.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

This site offers a clear-cut, free tutorial on how to create this type of batch script. However, there are many ways to script out this type of request, not to mention many cheap script creation utilities. To explore other options, conduct a Web search for "batch script date folder create."

This was first published in September 2007

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.