Hi Experts
When I type echo %date% in DOS I get "26/06/2008" (WinXP SP2)
I would like a batch file that will accept and validate an arguement in the "yyyymmdd" format
I am looking to call the batch file passing in command line arguements like such:
batchFile 20080627
I know in the batch file I can pick up the arguement as %1 but I don't know how to validate said arguement as an accepted format and a valid date and that the an arguement has indeed being passed in to the batch in the first place.
In the batch file itself the program will call a couple of java programs that also accept command line arguements too. For example
javaProgram fileName_20080625.csv
javaProgram fileName_20080626.csv
javaProgram fileName_20080627.csv
So I can change this to something like:
javaProgram fileName_%1.csv
How can I best do this?
Thankyou in advance.
Start Free Trial