Think of something that you wish Authorware could do but it doesn't?  Let the our good friends at Macromedia know via the wishlist.

Please let us know if you find any of the materials on this site inappropriate or offensive. Please include the url and why the material should be reviewed.

Comments and questions about the site are also welcome. Please no Authorware questions, use the AWARE list.


B5018 - How do I search my hard drive for a specific folder?

by - Joseph Ganci

I know some people have built installers with Authorware before. One function I would think they would have to use would be a "find folder" type script. Has anyone written one entirely in Authorware?? I know I could use UCDs or ActiveX but shouldn't there be a way with script alone to find a folder whatever it's name.

OK, I decided this was a good challenge since no one seemed to have a script handy. It took a little experimenting, but I've put together a script that is working:

paths := "c:\\"
findfolder := "Sliders"
found := ""
repeat while LineCount(paths) > 0
   line := GetLine(paths, 1)
   liner := SubStr(line, 1, CharCount(line) - 1)
   paths := DeleteLine(paths, 1)
   if LowerCase(SubStr(liner, RFind("\\\\", liner) + 1,
      CharCount(liner))) = LowerCase(findfolder) then
      found := found ^ line ^ Return
   subfolders := Catalog(line , "d")
   repeat with i := 1 to LineCount(subfolders)
     paths := paths ^ Return ^ line ^ GetLine(subfolders, i)
        ^ "\\"
   end repeat
end repeat

In the first line, set the variable "paths" to the drive you wish.

In the second line, set the variable "findfolder" to the folder name you're seeking.

In the end (and on a large hard drive with lots of folders, this can take several seconds or longer), you'll get a list of folders named "sliders" and their full paths from your hard drive. On my system, I got the following:


c:\Program Files\Macromedia\Authorware 5.1\Knowledge Objects\Interface Components\Sliders\

c:\Program Files\Macromedia\Dreamweaver 3\CourseBuilder\SupportFiles\images\sliders\

I hope this helps anyone who needs it!

There are 0 reviews
Add your review