• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Changing the name of a file in the temporary items folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: Changing the name of a file in the temporary items folder (From: Ed Stockly <email@hidden>)

  • Prev by Date: Re: Choose Folder Location
  • Next by Date: Finding out whether an application is already active?
  • Previous by thread: Re: Changing the name of a file in the temporary items folder
  • Next by thread: Re: Changing the name of a file in the temporary items folder
  • Index(es):
    • Date
    • Thread