Windows – Batch scripting: iterate over drive letters

batchdrive-letterswindows

In windows batch scripts, how can I iterate over all drive letters which correspond to physical volumes or mapped shares?

Best Answer

Also going to suggest a language switch, but to Powershell instead of VBS.

Get-PSDrive -PSProvider FileSystem

It's the wave of the future...