Results 1 to 4 of 4
  1. #1
    ripit is offline Member
    Join Date
    Oct 2007
    Posts
    37

    Default Problem with applescript

    I am attempting my first applescript and have come across a problem. I am trying to create a folder and have that folder take on the name of the current date. Line follows

    make new folder at folder "Customer" of folder "untitled folder" of folder "Desktop" of folder "marjutpoillucci" of folder "Users" of startup disk with properties {name:{theDate to current date}}

    It makes the folder but will not put the date in as a name

    help Please
    Thank you

  2. #2
    Colorblind's Avatar
    Colorblind is offline Senior Member
    Join Date
    Aug 2007
    Location
    Montreal, Qc, Canada
    Posts
    324

    Default

    This worked for me:

    set my_date to date string of (get current date)
    set my_hours to hours of (get current date)
    set my_minutes to minutes of (get current date)
    set folder_name to my_date & "_" & my_hours & "h" & my_minutes
    tell application "Finder"
    activate
    make new folder at folder "Customer" of folder "untitled folder" of folder "Desktop" of folder "marjutpoillucci" of folder "Users" of startup disk with properties {name:folder_name}
    end tell


    If you need advice from real good AppleScript geeks, go to Applescript and Scripting Resources @ MacScripter
    Better train people and risk they leave - than do nothing and risk they stay.

  3. #3
    ripit is offline Member
    Join Date
    Oct 2007
    Posts
    37

    Default

    Colorblind
    thank you that worked perfectly
    I will be sure to check out the website also
    thanks again

  4. #4
    PrePress Guru is offline Member
    Join Date
    Oct 2007
    Location
    New Rochelle, NY
    Posts
    73

    Default

    Mac Scripter is a fantastic resource.
    It helped me create an applescript that lets me use my filemaker job tracing system to automatically populate a quickbooks invoice.
    The time saved is amazing and to think i did it once by hand.


Posting Permissions

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

Sponsors