#!/p/kd/fdc/bin/wermit # (replace with the actual pathname of Kermit on your computer) # # findmissinghtml.ksc # # For websites... If an HTML file disappears, but Emacs backup files # for it exist (e.g. index.html.~3~), this script lists them. If the # html file itself can't be found anywhere, the latest backup file can # be renamed, which isn't scripted since human inspection is required. show var cmdfile # filename name of this script void \ffiles(*.html.~*~,&a) # Get array of Emacs backup files echo Backup files: \fdim(&a) # Tell how many for i 1 \fdim(&a) 1 { # For each one... .name1 := \&a[i] # get the filename .x ::= \findex(.html,\m(name1)) + 4 # get the extension .name2 := \fleft(\m(name1),\m(x)) # chop off the Emacs version number # If the original file doesn't exist, list its name if not exist \m(name2) echo MISSING: \m(name2) } exit