Announcement

Collapse
No announcement yet.

checking a path for its media type

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • checking a path for its media type

    Given an absolute path, how can I check whether files in that directory are on a local fixed disk partition? Checking the drive letter alone is insufficient because NTFS allows mounting into a directory. This will be a program intended only for use on local partitions, not on removable (including USB), optical, or network drives.
    Erich Schulman (KT4VOL/KTN4CA)
    Go Big Orange

  • #2
    there are plenty in the source code forum. Including some I know I posted (but cant find).

    I did find Kev Peel's version in a discussion at Drive types

    That should be more than enough to get you going
    Engineer's Motto: If it aint broke take it apart and fix it

    "If at 1st you don't succeed... call it version 1.0"

    "Half of Programming is coding"....."The other 90% is DEBUGGING"

    "Document my code????" .... "WHYYY??? do you think they call it CODE? "

    Comment


    • #3
      Code:
            DType = GetDriveType(DPath)
            Select Case DType
               Case 0
                  Msg = "an UNKNOWN Drive Location"
               Case 1
                  Msg = "Nowhere!  Drive Doesn't Exist!"
               Case 2
                  Msg = "a Removable Drive"
               Case 3
                  Msg = "a Fixed Disk Drive (" & Left$(DPath,2) & ")"
               Case 4
                  Msg = "a Network Drive"
               Case 5
                  Msg = "a CD-ROM Drive"
               Case 6
                  Msg = "a RAM Disk"
            End Select
         End If
      Scott Slater
      Summit Computer Networks, Inc.
      www.summitcn.com

      Comment

      Working...
      X