Re: creating a file within a folder etc...
Re: creating a file within a folder etc...
- Subject: Re: creating a file within a folder etc...
- From: Michelle Steiner <email@hidden>
- Date: Sun, 20 Feb 2011 16:27:05 -0700
On Feb 20, 2011, at 3:58 PM, Jean-Christophe Helary wrote: set project_location to choose folder set project_name to display dialog set project_name to text returned of project_name
tell application "Finder" set project_folders to make folder at project_location with properties {name:project_name} set parameters_path to (make file at project_folders with properties {name:"parameters.txt"}) as text end tell
set parameters_data to "whatever"
set parameters to open for access file parameters_path with write permission write parameters_data to parameters close access parameters ========================
Is there an easier way to do that ? Is there a more ASly way to do that ?
Here is my first pass at it.
set project_location to choose folder display dialog "Enter the name of the folder to be created" default answer "" set project_name to text returned of the result
tell application "Finder" set project_folders to make folder at project_location with properties {name:project_name} end tell
set parameters_data to "whatever"
set parameters to open for access file ((project_folders as text) & "parameters.txt") with write permission write parameters_data to parameters close access parameters
-- Michelle -- Discordians don't pray: it is far too dangerous.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden