Get the App
SLTechnology News&Howtos  ›  Development  › 

The usage of the VBS property Name

Shulou Source: shulou.com Published: 2022-06-03 19:53:48 11月12日 Update

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!

Tags: Attributes name time content parameters files more knowledge practicality learning next code dilemma reality objects situations folders articles cases editing Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi MySQL Microsoft MariaDB OPPO Reno