aspose file tools*
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
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: 18994
    
  40

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)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to copy a flash drive