This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes how to copy a flash drive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "how to copy a flash drive" Watch "how to copy a flash drive" New topic
Author

how to copy a flash drive

Wale Olajide
Greenhorn

Joined: Jul 11, 2014
Posts: 1
I want to know which Java class and method that can be called in order to copy the content of a flash drive(usb) without opening the flash drive. If possible also to know the prodecure on how to do it. I've tried some overloaded methods of copy() from the java.nio package. Thanks, I look forward to your respone.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 19235
    
  41

Wale Olajide wrote:I want to know which Java class and method that can be called in order to copy the content of a flash drive(usb) without opening the flash drive. If possible also to know the prodecure on how to do it. I've tried some overloaded methods of copy() from the java.nio package. Thanks, I look forward to your respone.


Yeah, that should work -- for a single file. To get the whole directory, you need a loop, and code it to get all the files.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
 
subject: how to copy a flash drive