PC Review


Reply
Thread Tools Rate Thread

Accessing DOS variables

 
 
=?Utf-8?B?RGF2aWQ=?=
Guest
Posts: n/a
 
      18th Apr 2006
Hello,

Does anybody know how to grab the text associated with the results you get
when you run the VOL command at a DOS prompt?

Thanks,
--
David
 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      18th Apr 2006
You could run a batch command that pipes it into a file (VOL > myfile.txt),
and then read the text file (using File Open and Line Input)

Alternative, use the GetVolumeInformation API. Randy Birch has an example of
how to do this at http://vbnet.mvps.org/code/disk/volumelabel.htm
(Obligatory Warning: Randy's site is aimed at VB programmers. There are
significant differences between the controls available for forms in VB and
in Access. As a result, many of his samples will not port directly into
Access. I think this may be one of those. Randy uses Print commands to write
to the form, and I don't believe that works in Access. However, you can see
how he gets the values that he's writing to the form)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"David" <(E-Mail Removed)> wrote in message
news:59FD193F-B498-4CC6-A47D-(E-Mail Removed)...
> Hello,
>
> Does anybody know how to grab the text associated with the results you get
> when you run the VOL command at a DOS prompt?
>
> Thanks,
> --
> David



 
Reply With Quote
 
bob
Guest
Posts: n/a
 
      18th Apr 2006
send it to text file and treat the text file as as text -based table


"David" <(E-Mail Removed)> wrote in message
news:59FD193F-B498-4CC6-A47D-(E-Mail Removed)...
> Hello,
>
> Does anybody know how to grab the text associated with the results you get
> when you run the VOL command at a DOS prompt?
>
> Thanks,
> --
> David



 
Reply With Quote
 
=?Utf-8?B?RGF2aWQ=?=
Guest
Posts: n/a
 
      19th Apr 2006
Douglas,

The API reference worked like a charm.

Thanks for pointing that site out to me.
--
David


"Douglas J. Steele" wrote:

> You could run a batch command that pipes it into a file (VOL > myfile.txt),
> and then read the text file (using File Open and Line Input)
>
> Alternative, use the GetVolumeInformation API. Randy Birch has an example of
> how to do this at http://vbnet.mvps.org/code/disk/volumelabel.htm
> (Obligatory Warning: Randy's site is aimed at VB programmers. There are
> significant differences between the controls available for forms in VB and
> in Access. As a result, many of his samples will not port directly into
> Access. I think this may be one of those. Randy uses Print commands to write
> to the form, and I don't believe that works in Access. However, you can see
> how he gets the values that he's writing to the form)
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "David" <(E-Mail Removed)> wrote in message
> news:59FD193F-B498-4CC6-A47D-(E-Mail Removed)...
> > Hello,
> >
> > Does anybody know how to grab the text associated with the results you get
> > when you run the VOL command at a DOS prompt?
> >
> > Thanks,
> > --
> > David

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing add-in's global variables cookiesncreamychoc@hotmail.com Microsoft Outlook Program Addins 4 24th Sep 2006 06:28 AM
Accessing inherited variables MrJim Microsoft VB .NET 5 7th Jun 2006 10:23 AM
Accessing inherited variables MrJim Microsoft VB .NET 2 6th Jun 2006 02:36 AM
Accessing class member variables - properties or variables? dwok Microsoft VB .NET 8 4th Mar 2005 03:54 AM
accessing parent variables Rustam Asgarov Microsoft C# .NET 2 30th Dec 2003 01:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:20 PM.