Java Programs
Tuesday, 18 March 2014
Java Program for Rename File
// rename file
import java.io.File;
class RenameFile
{
public static void main(String args[])
{
File f=new File("c:\\kunal.txt");
if(f.exists())
{
f.renameTo(new File("c:\\amol.txt"));
}
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment