Property: Item for Files
- Updated2024-09-12
- 1 minute(s) read
FileSystemObject and Dictionary > Properties > Property: Item for Files
Property: Item for Files
Returns a single File object. You can use this to access a single file.
Set oFile = Object.Item(Key)
| Object | Files Object with this property |
| Key | Variant Filename |
| oFile | File Returned object |
The following example returns the size of the file DIAdem.exe:
Dim fso, oMyFolder, oMyFiles Set fso = CreateObject("Scripting.FileSystemObject") Set oMyFolder = fso.GetFolder(ProgramDrv) Set oMyFiles = oMyFolder.Files Call MsgBox(oMyFiles.Item("DIAdem.exe").Size)