Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: how to create a directory based on date  (Read 2488 times)

0 Members and 1 Guest are viewing this topic.

donsls

    Topic Starter


    Starter

    • Experience: Beginner
    • OS: Unknown
    how to create a directory based on date
    « on: December 28, 2010, 09:08:00 PM »
    I would like to know how to create a directory using md command with the following format : DDMMYYYY
    Any help is greatly appreciated.

    Dusty



      Egghead

    • I could if she would, but she won't so I don't.
    • Thanked: 75
    • Experience: Beginner
    • OS: Windows XP
    Re: how to create a directory based on date
    « Reply #1 on: December 29, 2010, 12:08:15 AM »
    Do you need someone to do the coding to find out what your current date format is or will you tell us?

    One good deed is worth more than a year of good intentions.

    donsls

      Topic Starter


      Starter

      • Experience: Beginner
      • OS: Unknown
      Re: how to create a directory based on date
      « Reply #2 on: December 29, 2010, 09:25:07 AM »
      I don't know how to do it. So I am looking for the dos command.

      Salmon Trout

      • Guest
      Re: how to create a directory based on date
      « Reply #3 on: December 29, 2010, 11:37:42 AM »
      I don't know how to do it.

      1. Open a command window.

      2. Type echo %date% at the prompt and hit Enter.

      3. Tell us what you see, preferably by copying and pasting

      If you do not do this we cannot help you.



      donsls

        Topic Starter


        Starter

        • Experience: Beginner
        • OS: Unknown
        Re: how to create a directory based on date
        « Reply #4 on: December 29, 2010, 12:04:03 PM »
        I see the following:
        Wed 12/29/2010

        Salmon Trout

        • Guest
        Re: how to create a directory based on date
        « Reply #5 on: December 29, 2010, 12:37:28 PM »
        Code: [Select]
        for /f "tokens=1,2 delims= " %%A in ('echo %date%') do set dpart=%%B
        set foldername=%dpart:~3,2%%dpart:~0,2%%dpart:~6,4%
        MD "%foldername%"