Path: news.mathworks.com!not-for-mail
From: "us " <us@neurol.unizh.ch>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Detecting System Drive ( urgent help )
Date: Fri, 15 Feb 2008 08:02:04 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 24
Message-ID: <fp3gts$8bc$1@fred.mathworks.com>
References: <fp2sop$hsl$1@fred.mathworks.com>
Reply-To: "us " <us@neurol.unizh.ch>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1203062524 8556 172.30.248.35 (15 Feb 2008 08:02:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 15 Feb 2008 08:02:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:451575


"Mamata Kukreja":
<SNIP looking for his/her disks...

> how to detect whether
> its  E: or F:
> or watever differing from system to system...

one of the (imcomplete) solutions (on winos')

% get the list of current drives
     import java.io.*; 
     f=File(''); 
     r=f.listRoots; 
for i=1:numel(r) 
     disp(sprintf('%s',char(r(i)))); 
end 
% now you'd have to check each one for the
% contents you're looking for, eg,
     dir(char(r(1)));

us