• 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: how to coerce a built-up path?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to coerce a built-up path?


  • Subject: Re: how to coerce a built-up path?
  • From: Bill Cheeseman <email@hidden>
  • Date: Wed, 10 Dec 2003 04:20:07 -0500

on 2003-12-09 4:52 PM, Mark Dawson at email@hidden wrote:

> How do you coerce a built-up file/path into a file or alias type?
>
> set theFolder to (choose folder with prompt "Pick the folder")
> set fromFile to theFolder & "duplicate"
> set toBundle to theFolder & bundleName
> display dialog theFolder & "--" & fromFile & "--" & toBundle
> copyFile (fromFile as file) to (toBundle as file)
>
> When I run the above lines, I get an error, "can't make {alias
> "backup2:x:output:", "duplicate"} into a file."

In addition to what the other replies said, it is often safest to place the
entire concatenated string inside a pair of parentheses, to make sure
AppleScript passes the whole string to the display dialog command.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
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: 
 >how to coerce a built-up path? (From: Mark Dawson <email@hidden>)

  • Prev by Date: RE: Screen capture
  • Next by Date: Re: Screen capture
  • Previous by thread: Re: how to coerce a built-up path?
  • Next by thread: How can I get the list item of a disk and sub folder
  • Index(es):
    • Date
    • Thread