Page 1 of 1
how to list all drives on a computer windows 7
Posted: 12 Oct 2011 01:11
by Rileyh
Hi,
Could someone post a command that lists all current drives on the computer in windows 7
Thanks,
Rileyh
Re: how to list all drives on a computer windows 7
Posted: 12 Oct 2011 01:14
by Ed Dyreen
'
Code: Select all
for %%! in (
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
) do if exist "%%!:" (
::
echo. exist '%%~!:'
)
Re: how to list all drives on a computer windows 7
Posted: 12 Oct 2011 01:17
by Rileyh
THanks for such a quick reply!
Re: how to list all drives on a computer windows 7
Posted: 12 Oct 2011 01:18
by Rileyh
It worked!
THank you. I have been working on this issue for 2 days! (because i can't get the "for" command working and i don't understand it)
Regards,
RIleyh
Re: how to list all drives on a computer windows 7
Posted: 12 Oct 2011 01:22
by Ed Dyreen
'
I think you are going to like this, it's a beginners tutorial
http://www.allenware.com/icsw/icswidx.htm
Re: how to list all drives on a computer windows 7
Posted: 12 Oct 2011 01:26
by Rileyh
Thanks for the tutorial.
While your there, could you tell me how to do this whole section in my batch file.
I want the person to choose which drive to make a file in. It lists the drives (my previous question!), they choose one, and then the batch sets their answer as a variable. Then, it changes to the directory they inputted and makes the file there.
Could you tell me how to do so?
Thanks for the help,
Rileyh
Re: how to list all drives on a computer windows 7
Posted: 12 Oct 2011 16:20
by Ed Dyreen
'
While your there, could you tell me how to do this whole section in my batch file
....
Could you tell me how to do so?
Sure, are u going to pay me

No really, first of all, I don't know what section of batch ur talking about.