Re: Changing the name of a file in the temporary items folder
Re: Changing the name of a file in the temporary items folder
- Subject: Re: Changing the name of a file in the temporary items folder
- From: Michelle Steiner <email@hidden>
- Date: Sun, 9 Dec 2007 20:26:13 -0700
On Dec 9, 2007, at 4:49 PM, Ed Stockly wrote: But, if that's no good, just leave it in temporary items. Both Michelle's version and my version worked just fine if a folder with the same name already exists
Here's yet another method; it's a variation on my original one, but a bit cleaner, I think:
set tempfolder to path to temporary items folder from user domain tell application "Finder" repeat try set foo to (make new folder at tempfolder with properties {name:(random number from 1 to 1000) as text}) exit repeat end try end repeat end tell
-- Michelle
-- "My country, right or wrong: if right, to be kept right; and if wrong, to be set right." Senator Carl Schurz of Missouri, 1899
|
_______________________________________________
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