File Scripting object

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have been told I need to use the file scripting object...
What I need to do is to read a table containing a list of file paths to
other Access databases.
Then for each, I need to access and save in a table all of the details you
get when right-clicking on a file and choosing properties e.g. Size, Created,
Modified, Accessed, Security names etc.
Where this is documented and any tips on how to do the above would be much
appreciated.

David
 
While FSO is certainly one way of doing that, it's not the only way nor (in
my opinion) the best. I dislike using FSO in Access databases as there can
be versioning problems, so I use API calls, which are faster.

Randy Birch has details on most of the API calls required at his VBNet site
near the bottom of the File API section
http://vbnet.mvps.org/code/fileapi/index.html Note, though, that Randy's
site is aimed at VB programmers. There are some significant differences in
the controls available on VB forms vs. those available on Access forms. That
means some of the examples do not translate directly into Access, especially
those involving listboxex or comboboxes, and any that have control arrays.

If you're determined to use FSO, there's good reference material at
http://msdn.microsoft.com/library/en-us/script56/html/FSOoriFileSystemObject.asp
The examples for VBScript should port into VBA without any difficulty.
 
Douglas J. Steele said:
While FSO is certainly one way of doing that, it's not the only way nor (in
my opinion) the best. I dislike using FSO in Access databases as there can
be versioning problems, so I use API calls, which are faster.

Also, some organisations do not permit scripting as a matter of policy, and
some anti-virus/firewall products block it by default.
 
Thanks a million!

Douglas J. Steele said:
While FSO is certainly one way of doing that, it's not the only way nor (in
my opinion) the best. I dislike using FSO in Access databases as there can
be versioning problems, so I use API calls, which are faster.

Randy Birch has details on most of the API calls required at his VBNet site
near the bottom of the File API section
http://vbnet.mvps.org/code/fileapi/index.html Note, though, that Randy's
site is aimed at VB programmers. There are some significant differences in
the controls available on VB forms vs. those available on Access forms. That
means some of the examples do not translate directly into Access, especially
those involving listboxex or comboboxes, and any that have control arrays.

If you're determined to use FSO, there's good reference material at
http://msdn.microsoft.com/library/en-us/script56/html/FSOoriFileSystemObject.asp
The examples for VBScript should port into VBA without any difficulty.
 
Back
Top