PaulDotCom mailing list archives

Drive letter from volume name


From: lazydj98 at gmail.com (Joshua Smith)
Date: Wed, 17 Mar 2010 13:06:44 -0400

I admit I didn't read this thread fully, but> fsutil fsinfo might be useful
if you don't want to use wmi
http://technet.microsoft.com/en-us/library/cc788080%28WS.10%29.aspx
Syntax

fsutil fsinfo [drives]
fsutil fsinfo [drivetype] <VolumePath>
fsutil fsinfo [ntfsinfo] <RootPath>
fsutil fsinfo [statistics] <VolumePath>
fsutil fsinfo [volumeinfo] <RootPath>

 Parameters  Parameter Description

drives

Lists all drives in the computer.

drivetype

Queries a drive and lists its type, for example CD-ROM drive.

ntfsinfo

Lists NTFS specific volume information for the specified volume, such as the
number of sectors, total clusters, free clusters, and the start and end of
the MFT Zone.

statistics

Lists file system statistics for the specified volume, such as metadata, log
file, and MFT reads and writes.

volumeinfo

Lists information for the specified volume, such as the file system, and
whether the volume supports case-sensitive file names, unicode in file
names, or disk quotas.

<VolumePath>

Specifies the drive letter (followed by a colon).

<RootPathname>

Specifies the drive letter (followed by a colon) of the root drive.


On Tue, Mar 16, 2010 at 8:33 AM, Adrian Crenshaw <irongeek at irongeek.com>wrote:

It was something like this:
for /F %i in ('WMIC logicaldisk where "DriveType=2" list brief ^| find
":"') do set ufddrive = %i\

but his shows all UFDs, to get just the one by volume name I used:
for /F %i in ('WMIC logicaldisk where "DriveType=2" list brief ^| find
"MyVoulmeName"') do set ufddrive = %i\


Thanks,
Adrian

On Tue, Mar 16, 2010 at 6:50 AM, gold flake <ptinstructor at gmail.com>wrote:

Which was ...?

On Sat, Mar 13, 2010 at 12:44 AM, Adrian Crenshaw <irongeek at irongeek.com>
wrote:
Thanks, but  Tim Medin solution ended up being pretty slick. Tested it,
and
it worked great. Thanks.

Adrian

_______________________________________________
Pauldotcom mailing list
Pauldotcom at mail.pauldotcom.com
http://mail.pauldotcom.com/cgi-bin/mailman/listinfo/pauldotcom
Main Web Site: http://pauldotcom.com



_______________________________________________
Pauldotcom mailing list
Pauldotcom at mail.pauldotcom.com
http://mail.pauldotcom.com/cgi-bin/mailman/listinfo/pauldotcom
Main Web Site: http://pauldotcom.com




-- 
- Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pauldotcom.com/pipermail/pauldotcom/attachments/20100317/f7aa58cf/attachment.htm 


Current thread: