"The system cannot find file specified" when running from SQL Job

  • Following script runs fine from command prompt, but receive - "The system cannot find file specified" when running from SQL Job: EXEC master.dbo.xp_cmdshell "C:\Windows\System32\XCOPY.exe F:\Progra~1\Micros~1\MSSQL\backup\ETKPS\*.* \\ITNAS3\ETKPS_Archive"; SQL Agent Proxy has full privileges to all locations, XP_CmdShell is enabled, please help....

  • Verify the paths including this one:

    C:\Windows\System32\XCOPY.exe

    Also using the ~1 notation is sketchy (IMO), spell it out and use double-quotes to delimit it, ie:

    " F:\Program Files\Microsoft SQL Server\MSSQL\backup\ETKPS\*.*"

    Concidently, I am fairly sure it is your reference using the ~1 sntax that is the problem.

    CEWII

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply