Saved Bookmarks
| 1. |
Solve : Creating folders using the date? |
|
Answer» I am trying to figure out how to create new folders in DOS by using a date stamp. You'll need to parse the date to eliminate the forward slashes (MMDDYYYY)Ah right. My format is DD-MM-YY Quote Ah right. My format is DD-MM-YY Changing the delimiters and flipping the variables would be what I meant by: Quote Any code concerning dates is dependent on your local settings. You may have to make some minor adjustments to the code. Code: [Select]@echo off for /f "tokens=2-4 delims=- " %%i in ('date /t') do ( md c:\folder\%%j%%i%%k ) Many languages have functions for returning singular values for day, month and year regardless of format. Batch code can return the date; the USER has to be aware of the format. |
|