Get the App
SLTechnology News&Howtos  ›  Development  › 

The usage of the VBS property Drive

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

This article mainly introduces "the usage of VBS attribute Drive". In daily operation, I believe many people have doubts about the usage of VBS attribute Drive. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "the usage of VBS attribute Drive"! Next, please follow the editor to study!

Returns the drive letter of the drive where the specified file or folder is located. Read only.

Object.Drive

Object should be the name of the File or Folder object.

Description

The following code illustrates how to use the Drive property:

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 &" creation time: & f.DateCreated & "

"s = s &" Last visit time: & f.DateLastAccessed & "

"s = s &" Last modified time: & f.DateLastModified ShowFileAccessInfo = sEnd Function at this point, the study of "the usage of VBS attribute Drive" is over, hoping to solve everyone's doubts. The combination of theory and practice can help you learn better, go and try it! if you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Attributes learning time driver driver file more help utility next code name object location folder article method theory knowledge article Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Linux Shulou Information Shulou Technology Apple