• 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: getting a file by URL ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting a file by URL ?


  • Subject: Re: getting a file by URL ?
  • From: David Crowe <email@hidden>
  • Date: Tue, 1 Jun 2010 09:44:45 -0600

In my opinion the problem of getting a file URL into a filename format is best solved by writing a simple parser. You could make one that would run quite reliably by recognizing the prefixes "file://" and "file:///" (the longer one first, of course), "localhost" as a reserved word, the name of the current system disk, and the HTTP replacements for characters like Spaces ( )...and so on. While there might be certain pathological filenames that cause headaches this would at least be possible to do fairly easily. If you run a test using the most ugly filenames possible (using every special character allowed) and if you had a way to bail out softly when you run into something you can't handle (i.e. don't do anything nasty like delete the file or refuse to process the good files), you would probably be very happy with the result using the output of any reasonable application (even Amaya which is producing a Unix filename, not a URL).

- David Crowe
_______________________________________________
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
  • Follow-Ups:
    • Re: getting a file by URL ?
      • From: Tommy Bollman <email@hidden>
  • Prev by Date: Re: getting a file by URL ?
  • Next by Date: Re: getting a file by URL ?
  • Previous by thread: Re: getting a file by URL ?
  • Next by thread: Re: getting a file by URL ?
  • Index(es):
    • Date
    • Thread