The usage of the VBS property Name
This article introduces the relevant knowledge of "the usage of VBS attribute Name". In the operation process of actual cases, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
Sets or returns the name of the specified file or folder. Readability.
object.Name [= newname]
Parameter object
Required. Expected name of File or Folder object.
newname
Optional. If this parameter is provided, the specified object name is updated to newname.
description
The following code illustrates how to use the Name attribute:
Function ShowFileAccessInfo(filespec) Dim fso, f, s Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFile(filespec) s = f.Name & "on drive" & UCase(f.Drive) & "
" s = s & "Created: " & f.DateCreated & "
" s = s & "Last visited: " & f.DateLastAccessed & "
" s = s & "Last modified time: " & f.DateLastModified ShowFileAccessInfo = sEnd Function"Usage of VBS Attribute Name" is introduced here. Thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!