Jump to content

Need help with DriveGetDrive


Recommended Posts

What I want to do is use DriveGetGrive("removable") and get a list of all drive letters that are removable. For instance if 2 USB flash drives are drive F: and drive G: I want to be able to assign a value such as $fdive = 1, $Gdrive = 1. How can I accomplish this? I have searched the forum and read through the help file but I can't figure out how to pull what I need out of the array. I have been stumped for 2 days now so any help would be greatly appreciated.

Link to comment
Share on other sites

If you want dynamic variables you will need Assign() and Eval() but that's really messy. Why not use the nice and friendly array?

If you're having trouble understanding arrays, then check the article about arrays in the wiki.

Link to comment
Share on other sites

If you want dynamic variables you will need Assign() and Eval() but that's really messy. Why not use the nice and friendly array?

If you're having trouble understanding arrays, then check the article about arrays in the wiki.

Dynamic variables aren't exactly what I need(I have a feeling this way beyond my noobish abilities) . I do not care to have a list of variables set to zero. Such as $fdive = 0 $gdrive= 0 and then change them to $fdive = 1 $gdrive =1 if they are present. What I need to know is how to determine if a drive is removable and then perform function based on that. The script I am working on is on my computer at school so I can't give an exact example of what I am trying to do. I am currently using a long list of drivegettypes to see which drives are removable and then calling a function when a drive is found. I was wanting to know how to accomplish this using drivegetdrive.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...