java - Copying multiple binary files to one single binary file -
i have 2 binary file (macid.bin.bin, facdflttemp.bin) need copy single binary file (facdflt.bin).
below command can executed using java api.
"cmd /c copy /b " + "\"" +"c:\\program files\\project\\gs\\3_5_5\\macid.bin.bin" + "\"" + "\"" + " + c:\\program files\\project\\gs\\3_5_5\\facdflttemp.bin" + " \"" + "\"" + " c:\\program files\\project\\gs\\3_5_5\\facdflt.bin" + "\"" i tried using java api give error message:
0 file(s) copied. filename, directory name, or volume label syntax incorrect.**
please provide better solution execute above command.
please check code below. works me.
public class test{ public static void main(string[] args) throws ioexception { runtime.getruntime().exec("cmd /c copy /b \"d:\\1\\1.bin\" + \"d:\\1\\2.bin\" \"d:\\1\\3.bin\""); } } in case use
"cmd /c copy /b \"c:\\program files\\project\\gs\\3_5_5\\macid.bin.bin\" + \"c:\\program files\\project\\gs\\3_5_5\\facdflttemp.bin\" \"c:\\program files\\project\\gs\\3_5_5\\facdflt.bin\""
Comments
Post a Comment