Batch File Command line RRS feed

  • Question

  • Hi

    I'm new to batch file command lines, I need assistances to automate a report to run based on a specific date condition. Eg.

    If Current date >= 10th then

     run report

    else Exit 

    What I have done so far, but not getting what I want. 

    set currdate=%date:/=%

    IF %Currdate% GEQ "%10%

    (Run Report) ELSE (exit)



    Wednesday, September 7, 2016 8:57 AM


  • Hi,

    I fear that this forum is not really the correct location for such script based questions. The forum covers Microsoft Trainings and Certifications.

    But if you want to get the date in different parts, then the following link might be useful:

    And I would even suggest to look at PowerShell. In my eyes it makes more sense to look up Powershell and learn something which is more future proove than wasting time on learning some cmd scripting stuff which is much harder and could also fail easily (all is text based so you get all the trouble with localization and stuff like that!).

    With kind regards,


    Wednesday, September 7, 2016 5:41 PM