help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h-e-w] Listing NTFS roots in emacs


From: Paul Kinnucan
Subject: [h-e-w] Listing NTFS roots in emacs
Date: Mon, 3 Jun 2002 16:23:46 -0400

Timothy Babin writes:
 > Is there any way to list out the roots of the NT file systems on a box via
 > ntemacs?
 > I would like to get an explorer like view to start with in dired.
 > 
 > example:
 > 
 > a:
 > c:
 > d:
 > p:
 > 

The following function will return a list of
Windows file roots. 

       (defun w32-file-system-roots ()
         (let ((roots '("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:/")))
           (delq
            nil
            (mapcar
             (lambda (root)
                (if (file-exists-p root)
                   (substring root 0 2))
             roots))))

- Paul

 > Tim Babin
 > 
 > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
 > <HTML>
 > <HEAD>
 > <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
 > <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.89">
 > <TITLE>Listing NTFS roots in emacs</TITLE>
 > </HEAD>
 > <BODY>
 > 
 > <P><FONT SIZE=2 FACE="Arial">Is there any way to list out the roots of the 
 > NT file systems on a box via ntemacs?</FONT>
 > <BR><FONT SIZE=2 FACE="Arial">I would like to get an explorer like view to 
 > start with in dired.</FONT>
 > </P>
 > 
 > <P><FONT SIZE=2 FACE="Arial">example:</FONT>
 > </P>
 > 
 > <P><FONT SIZE=2 FACE="Arial">a:</FONT>
 > <BR><FONT SIZE=2 FACE="Arial">c:</FONT>
 > <BR><FONT SIZE=2 FACE="Arial">d:</FONT>
 > <BR><FONT SIZE=2 FACE="Arial">p:</FONT>
 > </P>
 > 
 > <P><FONT SIZE=2 FACE="Arial">Tim Babin</FONT>
 > </P>
 > 
 > </BODY>
 > </HTML>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]