How Do I Determine that a File alias actually points to a valid path?

I'm running into another obstacle - i need to validate that the alias (in that folder) actually points to a valid path and an existing file and that the link is not broken. For instance if that link points to a specific hard drive that may or may not be plugged in at the moment.
Any suggestions how to do this?
I'm guessing using the Get path function to be not empty? Not having success with that at the moment... :frowning:

Hey Gideon,

Here's your basic AppleScript to do the job.

  • Select the alias file in question.
  • Run the macro.
  • A window will pop open giving true (valid) or false (invalid).

Let me know if you have problems or questions.

-Chris


Validate the Selected Alias File in the Finder v1.00.kmmacros (6.7 KB)

Super, works like a charm. Wish i knew how to code these things myself, but you guys are on it, thanks.

I have moved your post and related posts to a new topic because it is a different question/subject.
Please follow this Forum rule in the future.

1 Like