x

Robocopy ERROR : No Destination Directory Specified.

Hi ,

I am trying to copy the file using Robocopy in SQL.

It give me following message:-

NULL
-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows     ::     Version XP010
-------------------------------------------------------------------------------
NULL
  Started : Fri Oct 08 16:45:59 2010
NULL
   Source :  \\hsbc-bsc1\ggg 
     Dest - 
NULL
    Files : *.*

  Options : *.* /COPY:DAT /R:1000000 /W:30 
NULL
------------------------------------------------------------------------------
NULL
ERROR : No Destination Directory Specified.
NULL
       Simple Usage :: ROBOCOPY source destination /MIR
NULL
             source :: Source Directory (drive:\path or \\server\share\path).
        destination :: Destination Dir  (drive:\path or \\server\share\path).
               /MIR :: Mirror a complete directory tree.
NULL
    For more usage information run ROBOCOPY /? or read Robocopy.Doc.
NULL
NOTE: Read "True Replication" in Robocopy.Doc prior to first use of /MIR !
****  /MIR can DELETE files as well as copy them !
NULL

But when i run using XP_cmdshell it work fine.

Actullly it is not identifying my Destination folder where i want to copy .

Pls help.

The feild Dest - is empty.

more ▼

asked Oct 08, 2010 at 04:24 AM in Default

mandara gravatar image

mandara
39 10 10 10

Given that both @Matt and I are coming at this from different sides, perhaps if you told us what you're trying to achieve (SQL Server commands, version of SQL Server etc), then we might be able to help more effectively!
Oct 08, 2010 at 04:55 AM ThomasRushton ♦
(comments are locked)
10|1200 characters needed characters left

4 answers: sort voted first
Sounds like a permissions error - does the userID that's running the job have access to the directory?
more ▼

answered Oct 08, 2010 at 04:41 AM

ThomasRushton gravatar image

ThomasRushton ♦
33.9k 18 20 44

(comments are locked)
10|1200 characters needed characters left
I would guess that this is an issue to do with QUOTED_IDENTIFIER - but really, given that you have just put in the error message and not any detail about what you are trying to run, I'm a bit lost for suggestions.
more ▼

answered Oct 08, 2010 at 04:54 AM

Matt Whitfield gravatar image

Matt Whitfield ♦♦
29.4k 61 65 87

(comments are locked)
10|1200 characters needed characters left
Have you tried specifying a destination directory?
more ▼

answered Oct 08, 2010 at 05:16 AM

Fatherjack gravatar image

Fatherjack ♦♦
42.7k 75 79 108

(comments are locked)
10|1200 characters needed characters left
Please post the actual robocopy command you have used. There are a multitude of switches and parsing this via T-SQL can be tricky.
more ▼

answered Oct 08, 2010 at 06:17 AM

Blackhawk-17 gravatar image

Blackhawk-17
11.9k 28 31 36

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x14

asked: Oct 08, 2010 at 04:24 AM

Seen: 3153 times

Last Updated: Oct 08, 2010 at 04:44 AM