Category : Recently Uploaded Files
Archive   : AURORA21.ZIP
Filename : WHERE.AML

 
Output of file : WHERE.AML contained in archive : AURORA21.ZIP
/* ------------------------------------------------------------------ */
/* Macro: WHERE.AML */
/* Written by: nuText Systems */
/* */
/* Description: This macro searches all directories on one or more */
/* disk drives for a filename or filespec. When the */
/* search is completed, the located files are */
/* displayed in a popup menu. */
/* */
/* Usage: Select this macro from the Macro List (on the Macro */
/* menu), or run it from the macro picklist */
/* */
/* You will be prompted for the filespec and drives. */
/* The filespec and drives must be entered in */
/* multi-string format, e.g. 'filespec/drives'. If no */
/* drives are specified, then all drives on your */
/* computer will be searched (excluding A: and B:). */
/* */
/* Select a file from the popup menu to display it in */
/* an edit window. */
/* */
/* Select the first line of the popup menu to edit the */
/* contents of the menu (you can then use the */
/* 'openword' command to open each file). */
/* ------------------------------------------------------------------ */

// compile time macros and function definitions
include bootpath "define.aml"


// function to show progress while scanning directories
function onscanning (directory found filespec)

// create the progress window
if not window? 'scan' then

createwindow 'scan'
setwinobj
setframe ">b"
setcolor border_color color white on gray
setcolor text_color color black on gray
settitle "Where is '" + filespec + "'" 'c'
setborder "1i"
setshadow 2 1

// center the window
width = 60
height = 16
ox = (getvidcols - width) / 2
oy = (getvidrows - height) / 2
sizewindow ox oy ox + width oy + height "ad"
writestr directory

elseif found then
writestr " FOUND" (color brightgreen on gray) (getcoord 'x1') - 7

elseif directory then
writeline
writestr directory

else
destroywindow
end

display
end


// scan directories recursively for a filespec
function scandir (filespec directory resultbuf)

onscanning directory

// is filespec found in the directory?
if locatefile filespec (getpath directory) then

// wildcard filespec specified?
if poschar '*?' filespec then
filebuf = loadbuf (qualify filespec directory)
if filebuf then
repeat
addline (qualify (sendobject "fmgr" "getffile") directory)
'' '' resultbuf
until not down
destroybuf filebuf
end

// complete filename was specified
else
addline (qualify filespec directory) '' '' resultbuf
end

// notify progress window that filespec is found
onscanning directory 1
end

// get a directory listing
if loadbuf directory '' '' "dh1" then
ss = '^' + (char 0)
if find ss 'x*' then
// do recursively for all subdirectories
repeat
name = qualify (sendobject "fmgr" "getffile") directory
// don't go back to parent directory
if (sizeof name) > (sizeof directory) then
scandir filespec name resultbuf
end
until not (find ss 'x')
end
destroybuf
end
end


var filespec
var drives
var i

// get default drives (all drives except floppies)
drives = sub 'B' '' (sub 'A' '' (getdisk 'm'))

if _PromptStyle == 'd' then
dialog "Where is" 65 5 "c"
field "&Filespec: >" 3 2 40 (getname (getbufname)) "_load"
field "&Drives: >" 3 4 37 drives
button "O&k" 55 2 8
button "Cancel" 55 4 8
if (getdialog ref filespec ref drives) <> 'Ok' then
return
end
else
// get filespec to search for and drives to search through
file_and_drives = ask "[filespec/drives] Where is"
splitstr '' file_and_drives ref filespec ref drives
end

if not filespec then
return
end

// search all available drives (except floppies), if none specified
if not drives then
drives = sub 'B' '' (sub 'A' '' (getdisk 'm'))
end

// convert to upper case
filespec = upcase filespec
drives = upcase drives

// create buffer to hold located files
resultbuf = createbuf
if resultbuf then

// set first line in resultbuf
ovltext "ðððððð Select this line to edit the file list ðððððð"

// setup progress window
onscanning '' '' filespec

// scan each drive
repeat
i = i + 1
directory = drives [i] + ":\\*.*"
scandir filespec directory resultbuf
until i >= (sizeof drives)

// destroy progress window
onscanning

currbuf resultbuf
if getlines > 1 then

// sort and display the located file list in a popup menu
sendobject "fmgr" "fsort" 'n'
file = popup resultbuf "Where is '" + filespec + "'" 60

if file then
if file [1] == 'ð' then
// edit the file list
delline 1 1 resultbuf
setbufname (qualify "TEMP.TXT" (getbufname (getwinbuf))) resultbuf
openbuf resultbuf
return
else
// open the selected file
open file
end
end
else
display
say filespec + " not found" 'b'
end
destroybuf resultbuf
end



  3 Responses to “Category : Recently Uploaded Files
Archive   : AURORA21.ZIP
Filename : WHERE.AML

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/