forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Drives

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Fri Aug 02, 2002 6:30 pm    Post subject: Drives Reply with quote

Is it possible to get a list of aal drives at a computer?
_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Aug 02, 2002 6:53 pm    Post subject: Reply with quote

Use this: (must be something at the drive)

Code:

list create,1
list filelist,1,C:
if @not(@null(@text(1)))
  rem C: exists
  end
list close,1


If I remind it well, there was an example of filelists posted by Mac...

EDIT1: Changed the old VDS tag into the CODE tag...


Last edited by Skit3000 on Sun Dec 22, 2002 7:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Fri Aug 02, 2002 10:22 pm    Post subject: Reply with quote

Maybe for each drive do in a loop:

Code:

  if @volinfo(<your driveletter>,T)
    info drive exists
  end



Your driveletter could for example be "F:". Note that if the specified drive is a
removable drive, and the media is removed, the drive will seem to exist
anyway.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Fri Aug 02, 2002 10:36 pm    Post subject: Reply with quote

Code:
REM --- Here we get the available drives on the system
%D = @sendmsg(@winexists(~LIST1),$018D,55555)
LIST SEEK,LIST1,0
REM --- By using an api, we just filled list1 with all reported drives
REM --- on the computer.  They are displayed in the list as [-a-]
Repeat
  %Z = @substr(@item(LIST1),3,3)
  REM --- Since the format is [-a-] we need to use @substr() to get just
  REM --- the drive letter itself.
  If @equal(%Z,A)@equal(%Z,B)
    REM --- I usually just yank the floppy drives out of the list first
    REM --- and don't bother testing to see what kind of drive they are.
  Else
    %%Drive = @volinfo(%Z,T)
    If @equal(%%Drive,Fixed)
      REM --- Drive is a Fixed Hard Drive, or is masked as a Fixed Hard Drive.
    ElsIf @equal(%%Drive,Network)
      REM --- Drive is a Network Connected Drive.
    ElsIf @equal(%%Drive,CD-ROM)
      REM --- Drive is a CD Based Drive
    Else
      REM --- Other drives of some sort.  This isn't an all inclusive list,
      REM --- but just an example to demonstrate how to get drives.
    End
  End
  %%Null = @next(LIST1)
Until @null(@item(LIST1))
LIST CLEAR,LIST1
DIALOG REMOVE,LIST1


-Garrett
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Fri Aug 02, 2002 10:45 pm    Post subject: Reply with quote

I posted a drive info program that I use here:

http://www.vdsworld.com/forum/viewtopic.php?p=2518#2518

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group