| View previous topic :: View next topic |
| Author |
Message |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Fri Aug 02, 2002 6:30 pm Post subject: Drives |
|
|
Is it possible to get a list of aal drives at a computer? _________________ phpBB Development Team |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Fri Aug 02, 2002 6:53 pm Post subject: |
|
|
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 |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Fri Aug 02, 2002 10:22 pm Post subject: |
|
|
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 |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Fri Aug 02, 2002 10:36 pm Post subject: |
|
|
| 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 |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
|
| Back to top |
|
 |
|
|
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
|
|