Hi there,
Using .exe and copy methods have been covered quite allot in these forums, but I cant quite find one that shows me why this isnt working:
when I run the following code (on a windows machine)
String cmd="COPY \"" +origiFTPlocation+ "\\\\"+zipfilename+ "\" \""
+ finalLocation + "\"";
try{
Process run = Runtime.getRuntime().exec(cmd);
run.waitFor();
}catch(Exception e){System.out.print(e.getMessage());
}
cmd = COPY "C:\\Documents and Settings\\psd_tmp4\\My Documents\\JavaProjX\\OWF\\origiFTPlocation\\age_v0_i0_ao.zip" "C:\\Documents and Settings\\psd_tmp4\\My Documents\\JavaProjX\\OWF\\finalLocation"
I get the following error:
can not tun program "COPY": createprocess error=2, the sytem cannot find the file specified
but this works fine when copying and pasting into comand line???
I have tried converting to single slashes but get the same
Edited by: Mr_Tuition on Jan 2, 2008 8:21 AM