>In this instance, Ed, I think the utility of the WSH can best be shown in how it can agument the listing, rather than just generating it.
As we all know, one thing that the WSH doesn’t do is allow you to filter the files collection. This you have to do yourself.Using ADIR() in conjunction with the WSH, would allow you to call the FileSystemObject's GetFile() method to get things like the actual case of the file name, rather than ADIR()' all upper, or the file type, such as application, text file, etc. You could even setup the list so that a context menu could invoke a dialog much like the properties from the Explorer. Of course, this is all dependent on what you want to do.
>
You won't get an argument from me here - if there is no advantage from having acollection of files or subfolders, rather than an array to plotz into a platform-specific thing like a combobox/listbox that uses arrays, then by all means, use ADIR(). FSO's collections gets around some things that ADIR() doesn't play too nicely with, like needing to actually change directories, and having to conceptually deal with both files and directories in the same fashion
when they aren't behaving in the same fashion. FSO does not replace native VFP things for all occasions, especialy inside VFP.
just most thingsSee WSH Advertising Manual Section title, "How to deal with the short comings of the WSH"
See WSH Advertising Manual Section title, "When to use WSH to deal with the short comings of the native VFP File Tools"
See "FoxTools Extended Help" on UT's Files Section if neither does quite what's needed