Date for Filename

7:51 pm Windows

I was writing some more backup scripts. I wanted to save the files by the date.

This will format the date in a command line as MM/DD/YYYY

%date:~4,2%-%date:~7,2%-%date:~10,4%

Leave a Comment

Your comment

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.