• 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: creating temp files??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: creating temp files??


  • Subject: Re: creating temp files??
  • From: John Delacour <email@hidden>
  • Date: Thu, 12 Jun 2003 12:44:48 +0100
  • Mac-eudora-version: 6.0b20

At 10:46 pm -0700 11/6/03, Andrew Oliver wrote:

Me:

set tempDir to path to temporary items
set tempFilename to tempDir & "tempfile2" as string
--> "Macintosh HD:private:tmp:501:Temporary Items:tempfile2"

You:

set tempDir to path to temporary items as string
set tempFilename to tempDir & "tempfile"
--> "Macintosh HD:private:tmp:501:Temporary Items:tempfile2"

Since the original poster wants to use the path in a do shell script routine, why not start off with a posix path, as in the example I gave.

"/tmp/temp.sh"
set {fU, f} to {result, result as POSIX file}

--> {"/tmp/temp.sh", file "dx:private:tmp:temp.sh"}


You now have both the paths that will be needed in the form that is needed for writing the file and for the shell script. I've posted so many examples in the past using this method that I'm surprised no one else has used it. Old verbose habits die hard I suppose.

JD




.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: creating temp files?? (From: Andrew Oliver <email@hidden>)

  • Prev by Date: Re: Parsing filenames
  • Next by Date: Re: Mail.app scripting
  • Previous by thread: Re: creating temp files??
  • Next by thread: Re: creating temp files??
  • Index(es):
    • Date
    • Thread