VBScript to print the file properties
kw.vbs
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("D:\VBScript\Trial.txt")
print objFSO.GetAbsolutePathName(objFile)
print objFSO.GetBaseName(objFile)
print objFSO.GetFileName(objFile)
print objFSO.GetExtensionName(objFile)
print objFSO.GetDriveName(objFile)
print objFSO.GetParentFolderName(objFile)
print "File Size " & objFSO.GetFile(objFile).Size & " bytes"
Output
D:\VBScript\Trial.txt
Trial
Trial.txt
txt
D:
D:\VBScript
File Size 30 bytes
Advertisement