copying a serialized file from one folder to other folder in every 2 minutes
<p>Please do not consider this question as repeated one ,I have few files in a folder ter , that is ter folder is in c : drive and it contain a seriliazed file named gfr.ser so the complete path is (C:\ter\gfr.ser) , Now i want this gfr.ser file to be copied in another folder inside C: itself named bvg so I want file to copied to path (C:\bvg\gfr.ser) below is the java class , please advise can I achieve the same ,please advise</p>

<pre><code>import java.util.TimerTask;
import java.util.Date;
import java.util.Timer;


// Create a class extends with TimerTask
public class ScheduledTask extends TimerTask {

    // Add your task here
    public void run() {
        Runtime.getRuntime().exec("cmd.exe /c start c:\\ter\\gfr.ser");
    }
}

//Main class
public class SchedulerMain {
    public static void main(String args[]) throws InterruptedException {

        Timer time = new Timer(); // Instantiate Timer Object
        ScheduledTask st = new ScheduledTask(); // Instantiate SheduledTask class
        time.schedule(task, now ,TimeUnit.SECONDS.toMillis(2));

    }
}
</code></pre>
