Property: ShortName for File
- Updated2024-09-12
- 1 minute(s) read
FileSystemObject and Dictionary > Properties > Property: ShortName for File
Property: ShortName for File
Specifies the short name of a file according to the 8.3 naming convention.
Object.ShortName
| Object | File Object with this property |
| Object.ShortName | String with read access |
The following example returns the short name of a file:
Function FileShortName(sFile) Dim fso, oMyFile Set fso = CreateObject("Scripting.FileSystemObject") Set oMyFile = fso.GetFile(sFile) FileShortName = "Shortname: " & oMyFile.ShortName End Function