Coercing a filename path to an alias
Coercing a filename path to an alias
- Subject: Coercing a filename path to an alias
- From: Greg Anderson <email@hidden>
- Date: Fri, 15 Jun 2001 12:10:47 -0500
I've found an odd problem with one of the scripts we wrote to go
along with our software. In a nutshell, we create a folder to gather
associated files that have been placed in a document. The user is allowed
to choose where this folder will be created. We have a situation where:
- The folder will be created in a folder that's on the desktop of a
non-boot partition.
- We have the path to that folder in a string variable (say,
folderPath is 'Stuff:A Folder:Gather:')
- We need to coerce that into an alias, which is done by making a
new variable as:
set folderAlias to (folderPath as alias)
- Assuming the boot disk is named "Boot", immediately after that
coercion, the variable folderAlias is set to 'Boot:A Folder:Gather:'.
Needless to say, this makes it difficult to correctly access the folder
we just created.
Is this a known AppleScript bug? We don't get this problem if the
folder is one that's not on the desktop.
Greg
---
Greg T. Anderson
Software Architect, Multi-Ad Services, Inc.
http://www.multi-ad.com