VB 5.0 Project-Reference Descriptive String
of Type Library
Bindview DirectScript File/Registry Interface 3.2 Type Library
Directories and files on your computer are organized in a hierarchical tree structure. Windows provides you with Windows Explorer to view the contents of this structure. You can use Windows Explorer to delete, copy, or move files or directories. Windows also provides you with a suite of Win32 API functions to perform these actions from Visual C++ or Visual Basic applications.
The File object, a part of DirectScript, simplifies the task of viewing and changing the contents of the directory structure. Moreover, you can use this object to manipulate the directory structure of any computer on your network, not just your own computer.
The File object supports these interfaces:
IFile: Can be used for directory and file operations.
IADs: Can be used to get some basic properties (such as name, class, and parent) of an object.
IADsContainer: Can be used to create, delete, copy, move, and enumerate contained objects.
IADsFileShare: Can be used to get and set properties of File Shares.
Interfaces associated with the File object require the special string "file_services". For example:
Dim File As IFile
Set File = GetObject("NTDS://DomainName/MachineName/file_services/c-drive\documents")
Notice how MachineName is followed by a forward slash and the special string "file_services". This is then followed by the name of the drive share. The path after the drive share contains backslashes. In this case, "documents" is the name of a directory. If a particular drive has not been shared then you can also use strings such as "C$" or "D$" which are special admin shares created by default by Windows.
If you do not use the path after the "file_services" string then you can enumerate all file shares using the IADsContainer interface for this file object.