Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DIR?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: DIR?
Miscellaneous
Thread ID:
00323604
Message ID:
00323738
Views:
22
>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 things

See 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
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform