Move File





7
Date Submitted Thu. Mar. 16th, 2006 11:17 PM
Revision 1 of 1
Coder mattrmiller
Tags File | Java | Move
Comments 1 comments
Move a file quickly in java.


public static void moveFile(String strSource, String strDest)
{
        // Declare variables
        File fSource = new File(strSource);
        File fDest = new File(strDest);
       
        // Move file
        fSource.renameTo(fDest);
}       

 

Matthew R. Miller

www.bluecreststudios.com
=================
Matthew R. Miller

http://bluecreststudios.com
http://www.codeandcoffee.com

Comments

Comments Alternatives?
Fri. Mar. 17th, 2006 3:51 AM    Scripter TimYates

Voting