Re: easy way to check if item is file or folder
Re: easy way to check if item is file or folder
- Subject: Re: easy way to check if item is file or folder
- From: Jon Kreisler <email@hidden>
- Date: Wed, 20 Dec 2000 15:10:10 -0500
- Web-page: http://MrMac.come.to/
This has worked:
set x to "Macintosh HD:Desktop Folder:File_A"
set xInfo to info for alias x
set xFolder to folder of xInfo
display dialog "Folder is:" & xFolder as text
On 12/20/2000, at 05:45 +0200, Erkki Pennanen wrote:
>
I like to get an easy solution to check if the item is file or folder.
>
>
I have tried Scripting Standard addition4s Info for command, but the
>
folder property does not give expected result (true of false). Other
>
properties of Info for command seems to give correct results.
>
>
Made as follows:
>
>
set x to info for file "Macintosh HD:Desktop Folder:File_A"
>
locked of x
>
display dialog "Locked is:" & locked of x as text -- OK!
>
folder of
>
display dialog "Folder is:" & folder of x as text x -- does not work!
>
>
What4s wrong?
>
--
--
Jon Kreisler
Mac and OpenVMS specialist
<
mailto://email@hidden>