urgent help: find out the drive letter of the flashdisk

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: urgent help: find out the drive letter of the flashdisk

Re: urgent help: find out the drive letter of the flashdisk

by Bex » Sat Dec 26, 2009 4:34 pm

So try, Chr(8+65), I think that should give you the driveletter.

Re: urgent help: find out the drive letter of the flashdisk

by Guest » Sat Dec 26, 2009 3:01 pm

--- I tried the SDBDevie and List, but this does not contain the DriveLetters.
Iterating through the Devices, I found the ID's, but no letters, even the DriveLetterIndex of all disks is "-1" - apart from one USB controller - "8"

Re: urgent help: find out the drive letter of the flashdisk

by Guest » Sat Dec 26, 2009 2:59 pm

... i now did exactly that, browse through the mycomputer child nodes searching for the caption of the selected removeable media ... extract the DriveLetter from this nodes caption and use it ... fine ... works

still, I have the feeling, there is an api call doing this ... I just couldnt figure it out ...

Re: urgent help: find out the drive letter of the flashdisk

by Eyal » Sat Dec 26, 2009 2:22 pm

SDBDevice or SDBDeviceList ?

Re: urgent help: find out the drive letter of the flashdisk

by Guest » Sat Dec 26, 2009 12:31 pm

im not at all getting there ... the media object is of no use, if I cannot find out how to instaciate it with the currently selected device and then access it.

I#m thinking to go through MyComputer and search for the device caption and then extract the driveletter.

I do not want to believe that this all would not work easier ... I just cant find the right api calls.

Re: urgent help: find out the drive letter of the flashdisk

by tutenchamun » Sat Dec 26, 2009 7:45 am

hm ... need to to think about it ...

I started of, selecting the device in the treenode manually - then start the script and figure it all out through the actual selected node ... and do a view sql statements - it is all there in the db apart from the drive letter ... thats then where i hung ...

I had it all working already, as earlier versions had the drive-letter within brackets under the node-caption - thats gone now ... so ...

I#ll get back to here as soon as found a way.

thanks so far

Re: urgent help: find out the drive letter of the flashdisk

by Bex » Sat Dec 26, 2009 5:07 am

http://www.mediamonkey.com/wiki/index.p ... riveLetter
It returns a long so you need to to add 65 to it and use Chr() to get the actual letter:
DriveLetterStr=Chr(Media.DriveLetter+65)

But what do you start with, MediaID , serialnumber or something else?

urgent help: find out the drive letter of the flashdisk

by tutenchamun » Sat Dec 26, 2009 4:37 am

hi everybody,
I am about to write a script, that automacically generates artis playlists for all mp3's on a synched flashdrive.

There is one missing bit to it, how am I ablte to get the actual driveletter of the removable drive.
I currently only find the mediID string (looks very windows device'ish).
I've spent hours now to work through the api .but had no success so far.

any suggestions ?

please help

Top