• 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: tell app, name in string var
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tell app, name in string var


  • Subject: Re: tell app, name in string var
  • From: Zack Jarrett <email@hidden>
  • Date: Fri, 27 May 2011 11:10:07 -0700

One nice way to make distinct files is to use the application mktemp from the command line.

Check out the man pages for mktemp to see details, but something like this will work really fast to generate distinctly named files:
mktemp /Users/zack/Desktop/blah.XXXX

That will put a file on my desktop named blah.XXXX where XXXX is replaced in order to make the filename unique.  There are some nifty options discussed in the man page.

I know it's not AppleScript, but it sure is handy.

Good luck!
Zack

On May 27, 2011, at 1:26 AM, Thomas Fischer wrote:

> Background of this small exercise is that I need a new file for a shell script, so I check for files until I find a name that isn't taken. In this context it is natural to work with POSIX paths, and the Finder is the authority for the existence of files...
>

 _______________________________________________
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: tell app, name in string var (From: tom wible <email@hidden>)
 >Re: tell app, name in string var (From: Thomas Fischer <email@hidden>)
 >Re: tell app, name in string var (From: Jan-Bultereys <email@hidden>)
 >Re: tell app, name in string var (From: Christopher Stone <email@hidden>)
 >Re: tell app, name in string var (From: Thomas Fischer <email@hidden>)

  • Prev by Date: Re: For some strange reason
  • Next by Date: Convert an image to a PDF
  • Previous by thread: Re: tell app, name in string var
  • Next by thread: Re: tell app, name in string var
  • Index(es):
    • Date
    • Thread