Ben, Hard to say what might be wrong without some more data. Obvious things I can think of:
* Is the "cp" command in your PATH? I assume you are running on Linux? * One of the arguments is problematic - src is missing (relative path?), dst directory is missing (relative path?) Here are some alternatives to consider http://rtsc.eclipse.org/docs-tip/The_XDCscript_Language Includes an example of how to copy a file in a portable fashion using Java functions rather than external shell commands http://rtsc.eclipse.org/docs-tip/XDCscript_-_xdc.exec A more portable and capable replacement for the raw Java.exec() method is the xdc.exec() method. It more easily exit status as well as stderr and stdout. For your case, xdc.exec("cp FILEA FILEB") should work - I just tried on Linux and it worked. BTW, RTSC/XDC is moving open-source via the Eclipse project. There is a newsgroup/forum for XDCtools at the eclipse.org website: http://www.eclipse.org/dsdp/rtsc/ Mark ________________________________ From: davinci-linux-open-source-boun...@linux.davincidsp.com [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On Behalf Of Ben White Sent: Wednesday, December 17, 2008 5:01 AM To: davinci-linux-open-source@linux.davincidsp.com Subject: Silly question about XDC: how to copy a file? Hi, Been struggling with this for a few hours. I need to copy a file as part of my build process. I wanted to put this in the package.bld file, so I used: var rt = java.lang.Runtime.getRuntime(); var proc = rt.exec( "cp FILEA FILEB"); but it doesn't work. Any ideas why not? Thanks, Ben
_______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source