using sortable date as parameter without typing the date
Moderator: DosItHelp
using sortable date as parameter without typing the date
I have a number of batch files that use the current date, in yyyymmdd format, as a parameter. Is there an alternative to having to key in the date a digit at a time when I run the batch file?
Re: using sortable date as parameter without typing the date
Code: Select all
@echo off &setlocal
for /f %%i in ('WMIC OS Get LocalDateTime /value') do for /f %%j in ("%%i") do set "%%j"
set "d=%LocalDateTime:~,8%"
:: echo %d%
:: pause
call "yourScript.bat" %d%
Steffen