• 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 part of a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing part of a string


  • Subject: Re: changing part of a string
  • From: Skeeve <email@hidden>
  • Date: Mon, 28 Jan 2008 21:10:27 +0100

Luther Fuller wrote:
OAnd ... when creating the new full path, you have to qualify each item before adding it to the path name, otherwise, it's just a string that can't be used as an alias. In the example above, the new path is "G5:bigfolder:CMYK images:myfolder:image1.eps", but the folders "CMYK images" and "myfolder" will have to be created if they do not exist. You'll need to move or copy the file "image1.eps".
Way too complicated...

If you have the full path as a string, and you don't mind using "do shell script", you could
do shell script "mkdir -p " & quoted form of posix path of fullPath
to create the full path hierachy.


If the fullPath contains the filename too, this should do the job:
do shell script "dir=$(dirname " & (quoted form of POSIX path of fullPath) & ") ; mkdir -p \"$dir\""


_______________________________________________
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 part of a string (From: Ed Stockly <email@hidden>)
 >Re: changing part of a string (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: scripting Acrobat print options
  • Next by Date: RE: "a reference to"
  • Previous by thread: Re: changing part of a string
  • Next by thread: Re: changing part of a string
  • Index(es):
    • Date
    • Thread