fetch directory listing
fetch directory listing
- Subject: fetch directory listing
- From: Dean Ross-Smith <email@hidden>
- Date: Wed, 17 Jan 2001 08:10:27 -0800
is there an easier way to get a directory listing from a Fetch window
into an applescript list?
Help. This is what I have (running on a cube and 9.0.4)...
-- get a url from a predefined list
set myurl to item counter of myripurl
set mydir to {}
tell application "Fetch 3.0.3"
activate
set ignore cache to true
open url myurl
set mywind to a reference to transfer window 1
set fetchcount to count mywind each remote item
if fetchcount > 2 then
set myfirstname to (a reference to remote item 3 of mywind)
set myfirstdir to (name of myfirstname)
end if
end tell
-- because 'list' is a Fetch command, I can't use it in the tell statement...
set mydir to {myfirstdir}
if fetchcount > 3 then
repeat with itemcounter from 4 to fetchcount
tell application "Fetch 3.0.3" to set myname to (name of (a
reference to remote item itemcounter of mywind))
set end of mydir to myname as list
end repeat
end if