Announcement

Collapse
No announcement yet.

4 digit year in Dos Batch

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 4 digit year in Dos Batch

    how can i use long date for schtasks command
    for example " schtasks /sd 16/072008
    the year must be 4 digit and i need it in batch file as var

    thanks
    gabi t.

  • #2
    Re: 4 digit year in Dos Batch

    wrong plase to post.
    This is not where the wall of fame is for!
    Which OS?
    Marcel
    Technical Consultant
    Netherlands
    http://www.phetios.com
    http://blog.nessus.nl

    MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
    "No matter how secure, there is always the human factor."

    "Enjoy life today, tomorrow may never come."
    "If you're going through hell, keep going. ~Winston Churchill"

    Comment


    • #3
      Re: 4 digit year in Dos Batch

      Because the user doens't respond I've moved the thread to the scripting forum.
      Marcel
      Technical Consultant
      Netherlands
      http://www.phetios.com
      http://blog.nessus.nl

      MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
      "No matter how secure, there is always the human factor."

      "Enjoy life today, tomorrow may never come."
      "If you're going through hell, keep going. ~Winston Churchill"

      Comment


      • #4
        Re: 4 digit year in Dos Batch

        Yo, Gabi.
        Let's start with the basics:
        - use CMD instead of BAT files. From the internal point of view, they are the same. Take a BAT file, change its extension and you have a CMD file The difference is in how (actualy, what) the two programs are run;
        - the setting you are looking for depends on the Regional and Language Settings (assuming, and God knows I hate to do that, but you don't leave me any other option) you are using XP, Vista or some Windows Server. In Regional and Language Options, Regional Options tab, Standard and Formats, click the Customize button, go to Date tab and set the date as you want it.

        If you need further assistance, then do ALL these things before you post a reply:
        - read the forum rules;
        - provide the following information:
        a) what OS are you using (Dumber already asked that, I just want all the questions to be in one place);
        b) what language are you using?
        c) what are you trying to do (provide the wider picture).

        Good luck.

        Sorin Solomon


        In order to succeed, your desire for success should be greater than your fear of failure.
        -

        Comment

        Working...
        X