Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The usage of VBS object Drives

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article focuses on "the use of VBS object Drives". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the usage of VBS object Drives.

Read only the collection of all available drives.

Description

Removable media drives are displayed in the Drives collection regardless of whether media is inserted or not.

The following code illustrates how to get the Drives collection and enumerate the collection members using the For Each...Next statement:

ShowDriveList functions Dim fso, d, dc, s, n Set fso = CreateObject ("Scripting.FileSystemObject") Set dc = fso.Drives For Each d in dc n = "" s = s & d.DriveLetter & "-" If d.DriveType = Remote Then n = d.ShareName ElseIf d.IsReady Then n = d.VolumeName End If s = s & n & "

"Next ShowDriveList = sEnd Function so far, I believe you have a deeper understanding of the use of" VBS object Drives ", might as well come to the actual operation of it! here is the website, more related content can enter the relevant channels to query, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 206

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report