xcopy Not Surpressing File/Directory Query

Posted by Daniel Bingham on Super User See other posts from Super User or by Daniel Bingham
Published on 2009-09-02T14:01:16Z Indexed on 2010/06/03 19:04 UTC
Read the original article Hit count: 273

Filed under:
|
|
|

Hey folks, I'm attempting to use xcopy to copy over a file from one machine to another on our network as part of a Java program. I'm calling xcopy like this:

xcopy "C:\Program Files\path\to\my\file" "\\othermachine\c$\Documents and Settings\<myUserName>\Desktop\Test\path\in\directory\structure\to\file" /e /y /i

Because I'm calling it from with in Java, I need all the prompts to be suppressed. For the most part, \i and \y have done exactly that. However, for this one file /i fails and I get the file or directory prompt. The result is that it hangs the entire program.

I've also tried calling it with /s /t /q appended on to the existing options, to no avail. Why isn't /i working to suppress the File or Directory prompt? Is there an order I need to call the options in? Is there something else I need to do?

EDIT: I should mention, the file is a text file - single line of text. It does not have an extension. It looks like this: FILE-NAME

© Super User or respective owner

Related posts about windows-xp

Related posts about java