Results 1 to 12 of 12
  1. #1
    rbaibich
    Guest
    Making folders on a daily basis...
    I'm setting up a network for an independent news show, and they use the same folder structure for every show. Right now the whole thing is being done manually, but I'd like to make some sort of script to make those folders every weekday in the early morning.

    Is there a way of doing that?

  2. #2
    Making folders on a daily basis...
    PowerBookG4's Avatar
    Member Since
    Jan 08, 2005
    Location
    New Jersey
    Posts
    6,188
    Your Mac's Specs
    Mac Pro 8x3.0ghz 12gb ram 8800GT , MBP 2.16 2GB Ram 17 inch.
    Rep Power
    21
    Probably could have it run on start up, Making a script with apple script, something like it checks the date then checks to see if its a week day.. then makes the folders. Idk not really a progammer just trying to offer some assistance. Sorry if what i said was pointless, just trying to help, lol
    My Website
    Blog
    I love my hosting company!
    I was on the M-F honor roll for Febuary:2006

  3. #3
    Kokopelli
    Guest
    Yes you can set up a cron job. If you are on Tiger would use launchd I suppose instead of cron but it is the same idea. I do not know how to configure launchd though.

    Rather than try and explain it here I would suggest doing a google for "cron tutorial OS X" and see if you can make sense of that. If not come back and one of us should be able to give you pointers.

    Here are two quick links I found (I dod not read either in detail)

    http://www.macdevcenter.com/pub/a/ma..._5.html?page=2

    http://www.macosxhints.com/article.p...01020700163714

  4. #4
    Making folders on a daily basis...
    MacsWork's Avatar
    Member Since
    May 22, 2005
    Location
    Closer than you think.
    Posts
    2,159
    Your Mac's Specs
    Performa 6116 2GBSCSI 8MB OS 7.5.3
    Rep Power
    16
    Scripting would be the way to go, however I am too lazy to dig into AS. If this helps you try it.

    If there is no need for dates, or you only change the top level. Set up the folder structure once and then at the top level ctrl click it and select create archive. This will zip the folders in their structure to be unzipped anytime.

    Now that's lazy!

  5. #5
    Making folders on a daily basis...
    PowerBookG4's Avatar
    Member Since
    Jan 08, 2005
    Location
    New Jersey
    Posts
    6,188
    Your Mac's Specs
    Mac Pro 8x3.0ghz 12gb ram 8800GT , MBP 2.16 2GB Ram 17 inch.
    Rep Power
    21
    Quote Originally Posted by MacsWork
    Scripting would be the way to go, however I am too lazy to dig into AS. If this helps you try it.

    If there is no need for dates, or you only change the top level. Set up the folder structure once and then at the top level ctrl click it and select create archive. This will zip the folders in their structure to be unzipped anytime.

    Now that's lazy!
    lol yeah... something I would do, but its not automatic.
    My Website
    Blog
    I love my hosting company!
    I was on the M-F honor roll for Febuary:2006

  6. #6
    Making folders on a daily basis...
    rman's Avatar
    Member Since
    Dec 24, 2002
    Location
    Los Angeles, California
    Posts
    12,594
    Your Mac's Specs
    2 x 3.0GHz Quad-Core, 6GB OS X 10.7.5 | 15in MacBook Pro 2.2GHz OS X 10.11.6 | 64GB iPad 2 WiFi
    Rep Power
    26
    Cool
    I know you might be able to AppleAcript or even Automater. But creating a shell script and running it as a cron job would most likely be easier.

    If the folder are created every Monday then cron can run the script on Monday for you. All you would need to is record the steps you do in a file.

    What is the folder structure?
    Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!

  7. #7
    rbaibich
    Guest
    Quote Originally Posted by rman
    What is the folder structure?
    06-14-2005
    06-14-2005/texts
    06-14-2005/images
    06-14-2005/video
    06-14-2005/etc

    I'm using Tiger. I have some experience with Linux, so that should help me with the shell scripting job. I hope.

  8. #8
    Making folders on a daily basis...
    rman's Avatar
    Member Since
    Dec 24, 2002
    Location
    Los Angeles, California
    Posts
    12,594
    Your Mac's Specs
    2 x 3.0GHz Quad-Core, 6GB OS X 10.7.5 | 15in MacBook Pro 2.2GHz OS X 10.11.6 | 64GB iPad 2 WiFi
    Rep Power
    26
    Cool
    Here is an example of a possible shell script.

    dte=`date "+ %m-%d-%y"`
    mkdir -p $dte $dte/texts $dte/images $dte/video $dte/etc

    Then you would need to place an entry in the crontab file to run your script once a week at certain time.
    Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!

  9. #9
    Kokopelli
    Guest
    Quote Originally Posted by rman
    Here is an example of a possible shell script.

    dte=`date "+ %m-%d-%y"`
    mkdir -p $dte $dte/texts $dte/images $dte/video $dte/etc

    Then you would need to place an entry in the crontab file to run your script once a week at certain time.

    Minor quibble but I think it should be

    dte=`date "+ %m-%d-%C%y"`

    since he wants a 4 digit year.

  10. #10
    Making folders on a daily basis...
    rman's Avatar
    Member Since
    Dec 24, 2002
    Location
    Los Angeles, California
    Posts
    12,594
    Your Mac's Specs
    2 x 3.0GHz Quad-Core, 6GB OS X 10.7.5 | 15in MacBook Pro 2.2GHz OS X 10.11.6 | 64GB iPad 2 WiFi
    Rep Power
    26
    Cool
    I looked over the 4 digit year. Thanks for the correction.
    Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!

  11. #11
    Making folders on a daily basis...
    PowerBookG4's Avatar
    Member Since
    Jan 08, 2005
    Location
    New Jersey
    Posts
    6,188
    Your Mac's Specs
    Mac Pro 8x3.0ghz 12gb ram 8800GT , MBP 2.16 2GB Ram 17 inch.
    Rep Power
    21
    am i suppose to see a difference in what kokopelli and rman wrote
    My Website
    Blog
    I love my hosting company!
    I was on the M-F honor roll for Febuary:2006

  12. #12
    Kokopelli
    Guest
    Quote Originally Posted by PowerBookG4
    am i suppose to see a difference in what kokopelli and rman wrote
    The %C, used to designate the 2 digit century in the date string.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Making folders visible
    By Germaris in forum macOS - Operating System
    Replies: 2
    Last Post: 05-31-2009, 07:32 PM
  2. I need help making a mac install of files and folders
    By crowndj in forum Schweb's Lounge
    Replies: 0
    Last Post: 10-14-2008, 05:53 PM
  3. Creating subdirectories/folders (making weblinks less ugly)
    By sarahp in forum Web Design and Hosting
    Replies: 0
    Last Post: 01-16-2008, 04:17 PM
  4. Restrict access to applications on time basis
    By Zettt in forum macOS - Apps and Games
    Replies: 0
    Last Post: 09-07-2007, 04:25 AM
  5. making video_ts & audio _ts folders
    By munkism in forum Movies and Video
    Replies: 9
    Last Post: 08-13-2005, 03:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •