"I'm not back." - Bill Harding, Twister
Thanks,<br />Vlad
Originally posted by Frank Ying:
the above solution is hard copy, byte-to-byte, you can use Runtime.exec("cp XX XX"), OS may find a way to just change dir.
Frank
Thanks,<br />Vlad
the above solution is hard copy, byte-to-byte, you can use Runtime.exec("cp XX XX"), OS may find a way to just change dir.
"I'm not back." - Bill Harding, Twister
Cheers,<P>RL
"I'm not back." - Bill Harding, Twister
Originally posted by Mohammed Dilsard:
hmm, i'm not sure why i've lost indentation when i pasted code..
Originally posted by Tapan Parikh:
[QB]OK, I tried doing this using Runtime on Win98, but Im getting the following exception...
Here is my code:
-----------------
private static void copyDataFiles(String src, String dest)
throws IOException
{
System.out.println("Copying files from " + src + " to " + dest + "...");
(new File(dest)).mkdirs();
Runtime rt = Runtime.getRuntime();
String cmd = "copy " + src + "\\*.* " + dest;
System.out.println(cmd);
rt.exec(cmd);
}
--------------
And here is the exception...
---------------
Copying files from data\lang\eng to upload\data\lang\eng...
copy data\lang\eng\*.* upload\data\lang\eng
java.io.IOException: CreateProcess: copy data\lang\eng\*.* upload\data\lang\eng error=0
java.io.IOException: CreateProcess: copy data\lang\eng\*.* upload\data\lang\eng error=0
<a href="http://www.utdallas.edu/~mgo031000/" target="_blank" rel="nofollow">Marian</a>
When evil is afoot and you don't have any arms you gotta be hip and do the legwork, but always kick some ... tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|