Re: how do you tell what folder a file is in?
Re: how do you tell what folder a file is in?
- Subject: Re: how do you tell what folder a file is in?
- From: hvar <email@hidden>
- Date: Fri, 26 Oct 2001 20:55:47 +0200
At 14:27 -0400 26.10.01, Arthur Cormack wrote:
Well ... I have come up with this ( It's a little convoluted but it
works ) :
on getParentFolder(whichOne) --which one is an alias to a file
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {":"}
set thisOne to the text items of (whichOne as text)
set thisTextItemCount to count the (text items of thisOne)
set thisFullPathToFolder to ((text items 1 thru (thisTextItemCount -
1) of thisOne) as text) --& ":"
set AppleScript's text item delimiters to oldDelims
return thisFullPathToFolder
end getParentFolder
--there must be a more direct route to finding this
Arthur,
You could ask the Finder:
tell application "Finder" to set parentFolder to (container of file
theFile) as alias
Hevard
--
***********************************
WINDOWS - Will Install Needless Data On Whole System
From email@hidden Thu Oct 25 16:30:07 2001
Path: forum.apple.com!news.apple.com!carillon.apple.com!user