This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes What s wrong in this file program to move a file to directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "What s wrong in this file program to move a file to directory" Watch "What s wrong in this file program to move a file to directory" New topic
Author

What s wrong in this file program to move a file to directory

Vinney Shanmugam
Ranch Hand

Joined: Aug 27, 2008
Posts: 104


file is not getting moved...
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 9074
    
    9

I don't see anything obviously wrong.
Does file.txt exist in the directory you are running the program from?
Is file.txt currently in use?
Does d:\myDirectory exist and do you have permission to write to it?

[How To Ask Questions On JavaRanch]
 
Don't get me started about those stupid light bulbs.
 
subject: What s wrong in this file program to move a file to directory