aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Rename File is fail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Rename File is fail" Watch "Rename File is fail" New topic
Author

Rename File is fail

Randika Isuru
Ranch Hand

Joined: Sep 15, 2013
Posts: 38

Hi all,
please any one can tell me why this code give me a output false
are there any thing wrong in my code i don't think so. please correct me



This code give me output : File renamed? false

Thanks...
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18847
    
  40

Randika Isuru wrote:
please any one can tell me why this code give me a output false
are there any thing wrong in my code i don't think so. please correct me



This code give me output : File renamed? false




Try it from the command line. Create two files (anyway you like). And then try to rename one of the files to be the same as the name of the other file. You will notice that the operating system doesn't like that.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Randika Isuru
Ranch Hand

Joined: Sep 15, 2013
Posts: 38

ohhhhhhhhh no!!!
i forget that
Thank you very much "Henry Wong"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Rename File is fail