Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Move File from one directory to another

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I am trying to move File from one directory to another directory using renameTo Option , but i am always getting false as the return type , with no Exception .



Please help
 
Paul Clapham
Sheriff
Pie
Posts: 20946
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Presumably C:\Two already exists (perhaps it's actually the directory you wanted to move the file to), so you can't rename C:\One\sai.txt to that. Did you actually want to rename it to C:\Two\sai.txt? If so then do that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic