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

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

  1. macrumors 6502

    Aug 3, 2011
    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
    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. macrumors 68040


    Jan 10, 2005
    Dallas, TX
    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.

  3. macrumors member

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

Share This Page