This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java Micro Edition and the fly likes Copy/Move files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Copy/Move files" Watch "Copy/Move files" New topic
Author

Copy/Move files

Will Richardson
Greenhorn

Joined: Nov 01, 2010
Posts: 16

Ok.. Another mobile Java question.

I want to know how to copy a file from one place to another on my phone with my java app (It will be used to randomly change the background..)

I have a snippet of code which creates a file on my "E:" drive



If this met an inputstream of some kind.. I think it would function..


Churs,
Will.
Gopinath Karyadath
Ranch Hand

Joined: Oct 14, 2009
Posts: 87
Will Richardson
Greenhorn

Joined: Nov 01, 2010
Posts: 16

I am afraid to say that your code does not function; It creates an unreadable file at the destination.

I am willing to say my code is incorrect, so it is included here: (there are 104 image files in the folder "Wallpapers")



 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Copy/Move files