DIAdem Help

Property: Name for File

  • Updated2024-09-12
  • 1 minute(s) read

Property: Name for File

Specifies the name of a file.

Object.Name
ObjectFile
Object with this property
Object.NameString with read and write access

The following example displays various file information:

Function ShowFileInfo(sFile)
  Dim fso, oMyFile, sOutput
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set oMyFile = fso.GetFile(sFile)
  sOutput = "File: " & oMyFile.Name & VBCrLf
  sOutput = sOutput & "Created: " & oMyFile.DateCreated & VBCrLf
  sOutput = sOutput & "Last Accessed: " & oMyFile.DateLastAccessed & VBCrLf
  sOutput = sOutput & "Last Modified: " & oMyFile.DateLastModified   
  ShowFileInfo = sOutput
End Function

Log in to get a better experience