Executing SQL Agent Job on Server10 | Moving Files on Server11 | Please Help | URGENT

I have a SQL agent job (test.sql) which is on  server10.

I have a source file(Dummy_Test) in AB folder\srcfiles, I need to move that to AB\TgtFiles. This folder is located on server 11.

How can I move them? Please help
I am using and running sql agent job test.sql on server10 which has below mentioned code in one of the step.

move '\\server11.a.b.com\shared\AB\SrcFiles\Dummy_Test' '\\server11.a.b.com\shared\AB\TgtFiles\Dummy_Test'

--- It says syntax error.

Please help, is it possible to do this? or am I missing something?
Jasmine SandlasAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott PletcherSenior DBACommented:
If the file doesn't have an extension -- rather than just the extension not showing because of folder/other view settings -- then maybe just dbl quotes instead of single:

move "\\server11.a.b.com\shared\AB\SrcFiles\Dummy_Test" "\\server11.a.b.com\shared\AB\TgtFiles\Dummy_Test"
Jasmine SandlasAuthor Commented:
I am sorry. I changed it to double quotes and it FAILED again.
Scott PletcherSenior DBACommented:
"It FAILED" doesn't tell my anything:

What was the error message?
Did you verify that the id running the task has proper permissions to both paths?
Did you verify that the file name really doesn't have an extension?
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

Jasmine SandlasAuthor Commented:
Yes, it failed again with the same error "Incorrect Syntax"
...have included the file extension as well.

...I guess if there would have been a permission issues, the error was "Access Denied" - Correct me if I am wrong here.

Now passing:-

move "\\server11.a.b.com\shared\AB\SrcFiles\Dummy_Test.txt" "\\server11.a.b.com\shared\AB\TgtFiles"
Scott PletcherSenior DBACommented:
Hmm, that's not a typical OS error message.

Is the job step type "Transact-SQL script (T-SQL)" or "Operating system (CmdExec)"?  It needs to be an OS step, not a T-SQL step.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jasmine SandlasAuthor Commented:
It is an OS step.
Scott PletcherSenior DBACommented:
Hmm, yeah, I don't see a "syntax error" in that command either.
Vitor MontalvãoMSSQL Senior EngineerCommented:
Please provide the complete command and respective full error message.
Jasmine SandlasAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.