Tuesday, August 11, 2020

#1 2004-12-15 11:56:36 am

From:: Willimantic, Connecticut
Registered: 2004-12-08
Posts: 5


We currently are using fetch to download files from an online server to our own. Mirroring as it were... However the HTML is created using MS Frontpage Express... and Acrobat Distiller so there is alot of junk there. *.pdx files, *.log files, even frontpage extension folders "_vti_cnf".

set startupdisk to "Macintosh HD:"

-- Local Settings (l*)
set lPath to startupdisk & "home:whelc:public_html:install:" as string
set lDeleteList to {"inst_man.pdx", "inst_man", "_vti_cnf", "inst_man.log"}

tell application "Fetch 4.0.3"
    -- Set FETCH Prefs
    set background notification to Speak Notificaton
    set download folder to alias lPath
    set treat mystery items as files to true
    set keep connections alive to false
    set blink icon to false
    set text line ending style to DOS style
    with timeout of 7200 seconds
        -- Mirror fti* to l*
        mirror remote directory ftiMirrorPath to alias lPath without delete strays
    end timeout
    -- Heres where i need to delete the files. Ive even tried a recursive procedure. Nothing so far.
    tell Application "Finder"
        --delete (every file of every folder of alias lPath whose name is in lDeleteList)
        --delete (every file of alias lPath whose name is in lDeleteList)
    end tell
    with timeout of 7200 seconds
        -- Mirror l* to fte*
        mirror alias lPath to url fteMirrorPath with delete strays
    end timeout
end tell

Finder got an error: Can't get every file of every folder of alias "Macintosh HD:home:whelc:public_html:install:" whose {"inst_man.pdx", "inst_man", "_vti_cnf", "inst_man.log"} contains name.

thats what i have so far. Any help would be appreciated. Were setting up an iBook thats automated to do most of the tedium involved in our jobs for show. In hopes that they will give us a G5... instead of the Windows box were trying to run this off of. (after all the (external) website is runnign apache on a *NIX core. IIS doesnt emulate that environment well. And php has bugs on windows)

Filed under: fetch



#2 2019-08-10 04:25:18 am

Registered: 2019-03-03
Posts: 1262

Re: Deletion


tell application "Finder"
   set theFiles to (every file of (lpath as alias) whose name extension is in {"pdx", "log"}) as list
   set theSubfolders to (every folder of (lpath as alias) whose (name contains "inst_man.pdx") or (name contains "inst_man") or (name contains "_vti_cnf") or (name contains "inst_man.log")) as list
   repeat with i from 1 to (count of theFiles)
       move (item i of theFiles) to trash
   end repeat
   repeat with i from 1 to (count of theSubfolders)
       move (item i of theSubfolders) to trash
   end repeat
end tell

Last edited by KniazidisR (2019-08-10 04:34:48 am)

Model: MacBook Pro
OS X: Catalina 10.15.4
Web Browser: Safari 13.1
Ram: 4 GB



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)