how to set date to current date using dos batch file command.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you need to use the current date in a batch file, the variable
%date%has the current date:It uses the format of the regional setting of your computer. In my computer it’s
dd/mm/yyyy.Since the
/can’t be part of a file name, they must be replaced with a safe character or nothing:If you want to create a backup copy of a file, you can do something like:
Or first set it to a variable and then use it: