A way to automatically create a New Folder based on that date?

Discussion in 'Mac Programming' started by TheMTtakeover, Jan 10, 2013.

  1. TheMTtakeover
    Expand Collapse
    macrumors 6502

    TheMTtakeover

    Joined:
    Aug 3, 2011
    #1
    I've done many many google searches and have come back with nothing. What I am looking for is either a command in the terminal or a way in applescript to create a new folder with today's date.

    I am going to use this as a skydrive backup technique. So if it was
    Code:
    cp -av /Users/osx/SkyDrive /Users/osx/Desktop/New
    I would want the new folder that is created with the cp command to be based on today's date.

    Any help is greatly appreciated!
     
  2. lee1210
    Expand Collapse
    macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #2
    I am on my phone, but I'd go with cron in a form:
    0 0 * * * *
    To run at 00:00 daily. The command would involve mkdir and date. Someone else can surely cobble this for you, but a few minutes in manages should get you from here to there.

    -Lee
     
  3. Persifleur
    Expand Collapse
    macrumors member

    Joined:
    Jun 1, 2005
    Location:
    London, UK
    #3
    Using Terminal:
    Code:
    cp -av /Users/osx/SkyDrive /Users/osx/Desktop/$(date +%Y%m%d)
     

Share This Page