Jump to content

Just a little help with a calc's syntax


This topic is 2296 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Howdy, all:

I'm using this ApplesScript calc to create a folder on the desktop of my Mac:

"set hfs_desktop to (path to desktop folder) as string¶

set hfs_subfolder to hfs_desktop & \"" & DateFormatter__CFpub ( Get ( CurrentDate ) ; "yyyy-mm-dd" ) & " Job Chop-Chop Backup\"¶

set posix_subfolder to quoted form of posix path of hfs_subfolder¶

do shell script \"mkdir -p \" & posix_subfolder"

 

...but I'm having a devil of a time trying to amend its syntax so the folder name is changed from 2016-03-11 Job Chop-Chop Backup to Job Chop-Chop Backup 2016-03-11. Admittedly, I'm a little confused with the escapes for the quotation marks--no matter how I reposition them I just can't get them right.

TIA for your help!

Rich

 

ON EDIT:

 

Nailed it: 

"set hfs_desktop to (path to desktop folder) as string¶

set hfs_subfolder to hfs_desktop & \"" & "Job Chop-Chop! Backup " & DateFormatter__CFpub ( Get ( CurrentDate ) ; "yyyy-mm-dd" ) & "\"¶

set posix_subfolder to quoted form of posix path of hfs_subfolder¶

do shell script \"mkdir -p \" & posix_subfolder"

Edited by WF7A
Link to comment
Share on other sites

This topic is 2296 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.