i have a lot of documents that we want to manage by importing the file properties to excel and then, managing through access. the files are all based on microsoft office products and I don't want to open them all, i want to create a batchfile.
I want to arrange the data in a table array. help!
Import file summary and custom properties to excel or access
Moderators: JRL, Dorian (MJT support)
-
- Newbie
- Posts: 4
- Joined: Tue Apr 11, 2006 6:20 am
This might get you started,
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("c:\windows\system32\scrrun.dll")
Wscript.Echo "Date created: " & objFile.DateCreated
Wscript.Echo "Date last accessed: " & objFile.DateLastAccessed
Wscript.Echo "Date last modified: " & objFile.DateLastModified
Wscript.Echo "Drive: " & objFile.Drive
Wscript.Echo "Name: " & objFile.Name
Wscript.Echo "Parent folder: " & objFile.ParentFolder
Wscript.Echo "Path: " & objFile.Path
Wscript.Echo "Short name: " & objFile.ShortName
Wscript.Echo "Short path: " & objFile.ShortPath
Wscript.Echo "Size: " & objFile.Size
Wscript.Echo "Type: " & objFile.Type
This code will only show these attributes back to your screen and, of course, you'll need to call it from MacroScheduler with something like:
VBEval>GetFileProperties (%CreateDate%,%AccessDate%,%ModDate%, etc.....)
one 'place holder' for each property you would like to record.
When you get these back into MacroScheduler, just use DDEPoke to send them to Excel.
This would be an interesting project. What are you trying to accomplish with this? Other than just "managing with Access"....
SkunkWorks
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("c:\windows\system32\scrrun.dll")
Wscript.Echo "Date created: " & objFile.DateCreated
Wscript.Echo "Date last accessed: " & objFile.DateLastAccessed
Wscript.Echo "Date last modified: " & objFile.DateLastModified
Wscript.Echo "Drive: " & objFile.Drive
Wscript.Echo "Name: " & objFile.Name
Wscript.Echo "Parent folder: " & objFile.ParentFolder
Wscript.Echo "Path: " & objFile.Path
Wscript.Echo "Short name: " & objFile.ShortName
Wscript.Echo "Short path: " & objFile.ShortPath
Wscript.Echo "Size: " & objFile.Size
Wscript.Echo "Type: " & objFile.Type
This code will only show these attributes back to your screen and, of course, you'll need to call it from MacroScheduler with something like:
VBEval>GetFileProperties (%CreateDate%,%AccessDate%,%ModDate%, etc.....)
one 'place holder' for each property you would like to record.
When you get these back into MacroScheduler, just use DDEPoke to send them to Excel.
This would be an interesting project. What are you trying to accomplish with this? Other than just "managing with Access"....
SkunkWorks
Here is a great link for VBScript to work with the FileObjects.
http://www.activexperts.com/activmonito ... eProps.htm
http://www.activexperts.com/activmonito ... eProps.htm
-
- Newbie
- Posts: 4
- Joined: Tue Apr 11, 2006 6:20 am
Retrieving Multiple File Properties from 1 Folder
thanks for the vba. i'm trying to obtain multiple file properties from multiple documents from a folder. the vba code seems to retrieve just the 1.
Also do I put a "sub" in front to run the code as a macro?
Also do I put a "sub" in front to run the code as a macro?
-
- Newbie
- Posts: 4
- Joined: Tue Apr 11, 2006 6:20 am
file properties use
I'm not a network monitor. I'm trying to collate a database and also, change multiple file properties without opening the files.
I'd like to put together some code to do multiple files for you. I'm a little pressed for time, but will stay at it. I'm thinking of using GetFileList> then passing the filenames to the VBScript, retrieving the properties, then writing them to Excel (or directly to Access if you'd rather).
I have a little "airport time" tomorrow, stay tuned....
SkunkWorks
I have a little "airport time" tomorrow, stay tuned....
SkunkWorks
-
- Newbie
- Posts: 4
- Joined: Tue Apr 11, 2006 6:20 am
thanks SkunkWorks! will stay tuned!
thanks SkunkWorks! will stay tuned!