PRB: XP_CMDSHELL Does Not Work with XCOPY

ID: Q152134


The information in this article applies to:


SYMPTOMS

XP_CMDSHELL does not work with XCOPY. When tried, the XP_CMDSHELL always returns "0 rows affected," and files and directories are not copied. The same XCOPY command works fine from the command prompt.


CAUSE

Certain commands such as XCOPY sometimes expect input from the user. Because of this, they must be assigned an input handle. Since we do not create the process with an input handle assigned, it fails.


WORKAROUND

Use the COPY command instead.

Additional query words: extended stored procedure


Keywords          : 
Version           : 6.0 6.5
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: March 26, 1999