Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Getting list of drivees with batch

Featured Replies

I'm trying to get a list of my drives in a batch to automate the process of assigning drive letters. When I type 'fsutil fsinfo drives' in comman line, I get a list of my drives.

C:\>fsutil fsinfo drives
Drives: A:\ C:\ D:\ E:\ F:\ G:\

But in a for loop, I only get the first drive letter. Anybody knows, what's wrong in the for construction?

C:\>for /F "tokens=*" %i in ('fsutil fsinfo drives') Do echo %i
C:\>echo Drives: A:\
Drives: A:\

Edited by Doc Symbiosis

Try this vbs script

Dim Act, Cnt, Drv, Fso, Rpt, Ts : Cnt = 0

Set Act = CreateObject("Wscript.shell")

Set Fso = CreateObject("Scripting.FileSystemObject") : Set Drv = Fso.Drives

Set Ts = Fso.CreateTextFile("Report_Drives.txt")

For Each strDrv In Drv

'If strDrv.DriveType = 2 Then '''' UNCOMMENT THIS TO ONLY LIST HARDRIVES OR PARTITIONS DONT FORGET TO DO THE END IF ALSO

Cnt = Cnt + 1

Ts.WriteLine strDrv & "\"

'End If

Next

Ts.WriteLine "Total Amount Of Drives = " & Cnt

Ts.close

Act.Run("Report_Drives.txt")

Well, there's nothing wrong with your construction (though you may want to use "tokens=1,*" if you just want the list of drive letters). The problem is that the character inbetween the drive letters is x000, which isn't a valid delimiter in the for command (nor have I been able, yet, to figure out what's going on there.)

What exactly are you tring to get and use it for? If I know that, I might be able to better help you along.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.