Jump to content

Applescript to create folders below installation


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

Recommended Posts

I have a solution that needs to have two sub-folders for long-term running. I have created an opening script that checks whether the solution has been installed, and if not, creates the folders for me. In Windows, I have a simple batch file that runs from a Send Message script command. I assume that I should use Applescipt on the Mac, but not being a Mac person, I have not been able to figure out a couple of (admittedly basic!) things:

1) I want Applescript to create the folders under the main database folder, which could be anywhere. Every example of Finder scripts specify the exact location of a newly-created folder. I do not know how to instruct Applescript to do this.

2) Once I have an Applescript, I can only seem to instruct FM to call up Script Editor--not actually run the script. The Script step looks like:

Send Apple Event["init","Script Editor", "misc", "dosc"]

I am sure that these problems are easy to fix, but do not know what to change.

Thanks,

David

Link to post
Share on other sites

Well...

let's see. What you need to do is provide the applescript with the path to your database. This is not too hard - what you can do is set a calc field in the DB to Status(CurrentFilePath), and then parse out the file name using a substitute command with Status(CurrentFileName). This will give you the path to the root of your install. Right?

Link to post
Share on other sites

This topic is 6578 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

×
×
  • Create New...

Important Information

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