Re: Open a Text File of Folders/Files?
Re: Open a Text File of Folders/Files?
- Subject: Re: Open a Text File of Folders/Files?
- From: email@hidden
- Date: Sat, 8 Dec 2001 14:17:03 -0600
At 09:31 -0700 12/08/2001, Gnarlodious wrote:
>
Seasons Greetings!
>
>
How do I operate on a text list of folders?
>
>
Text File example:
>
>
Apple:MissileToe:
>
Apple:Fruitcake:
>
Apple:Partridge in a Pear Tree:
______________________________________________________________________
Hello Rachel,
This is pretty simple:
----------------------------------------------------------------------
set backupFilesList to alias "Minerva:BackMeUp.txt"
set folderList to {}
try
set theFiles to paragraphs of (read backupFilesList)
on error errMsg number errNum
tell me to display dialog errMsg & return & return & errNum
return
end try
repeat with i from 1 to count of theFiles
try
set theItem to item i of theFiles
if theItem is not "" then
set end of folderList to alias theItem
end if
end try
end repeat
if (count of folderList) > 0 then
tell application "Finder"
activate
open folderList
end tell
end if
----------------------------------------------------------------------
Best Regards,
Christopher Stone
______________________________
StoneWorks Computer Consulting
email@hidden