Postingan

Menampilkan postingan dari September, 2009

Batch command for getting current date for file creation

if you wonder how to automate some task like backup that include current date in a batch file then this is a small tips how to do it just add: %date:~-4,4%%date:~-10,2%%date:~-7,2% on the parts of the file that you want to add a date, it utilize the internal command of date, and substring it to get the current date with YYYYMMDD format, depending on your locale format, for the example above i use mm/dd/yyyy you should adjust it to your need refference : http://support.microsoft.com/kb/555314