Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com> List-Archive: <http://sources.redhat.com/ml/cygwin/> List-Post: <mailto:cygwin AT cygwin DOT com> List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <022b01c309a2$27c32c00$767e86d9@ellixia> From: "Elfyn McBratney" <elfyn-cygwin AT exposure DOT org DOT uk> To: "cygwin" <cygwin AT cygwin DOT com>, "andrew brian clegg" <a DOT clegg AT mail DOT cryst DOT bbk DOT ac DOT uk> References: <Pine DOT LNX DOT 4 DOT 44 DOT 0304231449440 DOT 28614-100000 AT sark DOT cryst DOT bbk DOT ac DOT uk> Subject: Re: Windows volume labels Date: Wed, 23 Apr 2003 15:10:44 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 > Hi folks, > > Apologies if this is well-documented but I can't find an answer in the > usual places. > > Is there a cygwin-friendly way of retrieving the volume label for a > particular drive (or for all drives) in e.g. a perl or shell script? Short > of running Windows' dir.exe on the appropriate drive and parsing the > result! > > Or would I have to use the Windows API? IIRC, there isn't. Wouldn't be hard to do though, just use the GetVolumeInformation() Win32 API call. Elfyn -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/