move files not working using Powershell in SQL Agent Job

  • I have this simple move files command that works fine in powershell prompt. However, if I schedule a SQL Agent job (on SQL Server 2014), the job fails to copy the files (the job itself did completed, not failed). The message is "Cannot move the item because the source and destination paths did not resolve to the same provider". I am pretty sure the job has the correct credential that can write to the remote path and I use "PowerShell" as the job type.

    move-item c:\temp\*.txt "\\www.abc.com\daily report"

    Any ideas? Thanks.

  • Look at the following links on StackTrace and here on SQL Server Central.

    Hopefully that will help.

    Gaz

    -- Stop your grinnin' and drop your linen...they're everywhere!!!

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

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