Jump to content

Search the Community

Showing results for tags 'DriveGetType'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. I am trying to use DriveGetType to find all the removeable storage devices attach to any given computer. I am using the following code: Func GetDrives() ; Fill the destination list Local $drives = DriveGetDrive("ALL") If @error == 1 Then MsgBox(0, "Error", "No removeable media found, cannot continue!" & @CRLF & "Please insert a micro SD card or other removeable media to copy to.", 15) ;GUISetState(@SW_SHOW, $mainwindow) GUISetState(@SW_HIDE, $cabswindow) Else For $i = 1 To $drives[0] Local $drive = $i Local $type = DriveGetType($i & "\") If @error == 1 Then $type = "Error getting drive type" EndIf ConsoleWrite($drives[$i] & "\ " & $type & @CRLF) Next EndIf EndFunc ;==>GetDrives When I run that bit of code, I see the following in the console window: c:\ Error getting drive type e:\ Error getting drive type g:\ Error getting drive type h:\ Error getting drive type q:\ Error getting drive type t:\ Error getting drive type Is DriveGetType not able to get the device type from a root directory (IE: C:\) only, or does it require a full path to find the root device? I would think the above would work just fine, but alas, it does not seem to. Any help is greatly appreciated. - Vadtec
×
×
  • Create New...