Path: news.mathworks.com!not-for-mail
From: "Mamata Kukreja" <mamata_kukreja@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Detecting System Drive ( urgent help )
Date: Mon, 5 May 2008 06:41:04 +0000 (UTC)
Organization: SIES
Lines: 35
Message-ID: <fvma5v$heg$1@fred.mathworks.com>
References: <fp2sop$hsl$1@fred.mathworks.com> <fp3gts$8bc$1@fred.mathworks.com>
Reply-To: "Mamata Kukreja" <mamata_kukreja@yahoo.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1209969664 17872 172.30.248.37 (5 May 2008 06:41:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 5 May 2008 06:41:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1253471
Xref: news.mathworks.com comp.soft-sys.matlab:466607


"us " <us@neurol.unizh.ch> wrote in message
<fp3gts$8bc$1@fred.mathworks.com>...
> "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
> 
> ERROR: 

??? Undefined command/function 'toChar'.

Error in ==> opaque.char at 94
    chr = toChar(opaque_array(1));

Error in ==> untitled at 6
     disp(sprintf('%s',char(r(i))));
>