hi all,
i want to copy MS-Access file from directory to another, i knew that we must use Runtime class and passing cmd commands , i tried but there is no any action, please if any one know the correct way for this, tell me.
Thanks in advance
hi all,
i want to copy MS-Access file from directory to another, i knew that we must use Runtime class and passing cmd commands , i tried but there is no any action, please if any one know the correct way for this, tell me.
Thanks in advance
import java.io.*;
class A{
public static void main(String args[]) throws IOException{
// in Mac
Runtime.getRuntime().exec("cp /Users/eisa/documents/myFile.odt /Users/eisa/Desktop/.");
// in windows similar to this
Runtime.getRuntime().exec("copy c:/myFile.doc c:/windows/myFile.doc");
}
}هناك طرق اخرى غير هذه الطريقه مثل قرائة الملف الاول ومن ثم كتابة نفس المعلومات في الملف الثاني