Files- Can't read off external drive?

For fun, I decided to write a program that would sync between a folder on my desktop and my mp3 player.

First I had the program sync two fokders on desktop and it worked fine. But when I changed it to my MP3 player and my desktop the program said that there were no files on my mp3 player (using the list() method; it returned null. What can be some reason that I can't read files from my mp3 player?

PS The path for the mp3 player is: "My Computer\\SanDisk Sansa m240\\Media"

[497 byte] By [java4life87a] at [2007-10-2 11:24:35]
# 1
> PS The path for the mp3 player is: "My> Computer\\SanDisk Sansa m240\\Media"No, it's not. It's probably something like "C:\\Documents and Whatever\\user\\My Computer..."
CeciNEstPasUnProgrammeura at 2007-7-13 4:29:48 > top of Java-index,Java Essentials,Java Programming...
# 2
how do i find the path name for my computer?
java4life87a at 2007-7-13 4:29:48 > top of Java-index,Java Essentials,Java Programming...
# 3
When you bring up Windows Explorer, find the list of drive letters (e.g. A: C: D: etc.). The mp3 driver may have installed the mp3 device to appear as though it were a disk drive. If so, that drive letter will be the root path for the mp3 player.
Laszlo.a at 2007-7-13 4:29:48 > top of Java-index,Java Essentials,Java Programming...
# 4
> how do i find the path name for my computer?Fire up your explorer and search.
CeciNEstPasUnProgrammeura at 2007-7-13 4:29:48 > top of Java-index,Java Essentials,Java Programming...
# 5
This is the path name that I get, but when I type it into the address bar I get an error that says th path name is incorrect: C:\Documents and Settings\Cool Computer\Desktop\My Computer
java4life87a at 2007-7-13 4:29:48 > top of Java-index,Java Essentials,Java Programming...
# 6

> This is the path name that I get, but when I type it

> into the address bar I get an error that says th path

> name is incorrect: C:\Documents and Settings\Cool

> Computer\Desktop\My Computer

Yeah, I double-checked. "My Computer" is nothing but a link. It's not even a directory. So your directory is very likely on Desktop. Why didn'T you get the path of that one?

CeciNEstPasUnProgrammeura at 2007-7-13 4:29:48 > top of Java-index,Java Essentials,Java Programming...
# 7

The thing is the mp3 player doesn't let you do anything other than add or delete files. You can't check the properties or anything. That's why I took the name that was in my computer. It doesn't even act as a drive, like D F G etc.

Any other suggestions?

Thanks for all your help btw.

java4life87a at 2007-7-13 4:29:48 > top of Java-index,Java Essentials,Java Programming...
# 8
SinceI can't get the address of my computer then how do I get a list of all the drive letters?
java4life87a at 2007-7-13 4:29:48 > top of Java-index,Java Essentials,Java Programming...
# 9

Are you at least able to see the list of files?

Sheesh...this whole "give the user as little freedom as possible" garbage is enough to make you <mumble><mumble>airplanes<mumble><mumble>tall buildings.

And to think, this has been going on with personal computers since the Apple "Users aren't smart enough to use a mouse with more than one button." Macintrash

Laszlo.a at 2007-7-13 4:29:48 > top of Java-index,Java Essentials,Java Programming...
# 10

You get the list of all the drive letters by looking in Windows Explorer, or through the control panel's hardware settings...

You can also get a list of the "roots" (in this case drive letters) with File.listRoots() - it returns an array of File objects. For windows systems this is a list of drive letters, basically.

Laszlo.a at 2007-7-13 4:29:48 > top of Java-index,Java Essentials,Java Programming...
# 11
> Any other suggestions?Buy another MP3 player? The makers of your device apparenly don't like users to be able to use them with software made by other people, including yourself.
jsalonena at 2007-7-13 4:29:48 > top of Java-index,Java Essentials,Java Programming...
# 12
aliright then, thanks for all of your help
java4life87a at 2007-7-13 4:29:48 > top of Java-index,Java Essentials,Java Programming...
# 13
It reportedly "shows up as a drive in Mac OSX" so there might be a way, but so far it sounds like your player is similar to the iPod: not accessible without the producer's special software.
jsalonena at 2007-7-13 4:29:48 > top of Java-index,Java Essentials,Java Programming...
# 14
The thing is, there is no software that coes with it
java4life87a at 2007-7-13 4:29:48 > top of Java-index,Java Essentials,Java Programming...
# 15
so how do you transfer files between the computer and the player?
jsalonena at 2007-7-20 21:09:02 > top of Java-index,Java Essentials,Java Programming...
# 16

A little Googling turned up that this is probably a USB-connected device. It probably shows up in the Control Panel's Portable Devices listing, and you drag and drop files onto it.

If it's USB, then Java doesn't provide standard support for it. There are a few 3rd-partt possibilities, but none that I'm aware of that work well in Windows.

ChuckBinga at 2007-7-20 21:09:02 > top of Java-index,Java Essentials,Java Programming...