Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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
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: 8836
    
    7

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?

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: What s wrong in this file program to move a file to directory
 
Similar Threads
How to copy PDF/Ms Word file to another directory
renameTo()
Need help with moving file from one directory to other
moving files to different folders
Problem in moving file