Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Copy/Move files  RSS feed

 
Will Richardson
Greenhorn
Posts: 16
Chrome Ruby Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Gopinath Karyadath
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Will Richardson
Greenhorn
Posts: 16
Chrome Ruby Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!