Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Getting connected Flashdrive list
I am trying to get a list of connected Flash drives that appear horizonally
Connected Drives: [color=Blue]H: I: J: K: L:[/color]
My Problem is when I perform the variable substitution I get a nul. I have researched for 3 weeks now, and have come to the conclusion that it may not be possible. Can anyone get this code to work???
rem ---> setup vbs file <---
echo > "vbs.vbs" Set objSWbemServices = GetObject("winmgmts:\.")
echo >>"vbs.vbs" Set colSWbemObjectSet = objSWbemServices.InstancesOf("Win32_LogicalDisk")
echo >>"vbs.vbs" For Each objSWbemObject In colSWbemObjectSet
echo >>"vbs.vbs" If UCase(objSWbemObject.Description) = "REMOVABLE DISK" Then WScript.Echo objSWbemObject.DeviceID
echo >>"vbs.vbs" next
rem --------get drive list----------------
for /F %%a in ('cscript //nologo "vbs.vbs"') do (