Announcement

Collapse
No announcement yet.

Robocopy - Copy Root folder name of Source

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Robocopy - Copy Root folder name of Source

    Okay, I have read and tried every option and can't make this work in 1 step.

    I need to copy

    C:\Data\Original to F:\Data2

    I need to have this when it completes

    F:\Data2\Original when it completes, with all of the files in the Original folder.

    I am using

    robocopy C:\Data\Original F:\Data2 /E /Z /Copyall

    I end up with F:\Data2\ with the files from Original, but the root folder

    I have to script out a bunch of copies and don't want to have to manually create the correct root folder names in the source and don't want to have to create a script that just creates the folders first.

    Thanks

  • #2
    Re: Robocopy - Copy Root folder name of Source

    robocopy C:\Data\Original F:\Data2\Original /E /Z /Copyall should do the trick

    bio..

    Comment


    • #3
      Re: Robocopy - Copy Root folder name of Source

      That copied the files inside "Original", but did not create the root folder "Original" in the destination.

      Thanks

      Soule

      Comment


      • #4
        Re: Robocopy - Copy Root folder name of Source

        I'm sure you will find the appropriate switch to use somewhere in here. http://www.google.com.au/search?hl=e...bocopy+switche
        1 1 was a racehorse.
        2 2 was 1 2.
        1 1 1 1 race 1 day,
        2 2 1 1 2

        Comment


        • #5
          Re: Robocopy - Copy Root folder name of Source

          What your basically telling robocopy to do is copy all the files and folders under the directory c:\data\original to the location f:\data\

          Is the original folder the only folder in the data folder???

          You could try this

          Code:
          robocopy c:\data D:\data2 *.* /e /sec /r:0 /w:0 /LOG:D:\CopyData.txt
          That will copy the entire contents of the data folder to the data2 folder.

          Else use this

          Code:
          robocopy c:\data\Original D:\data2\Original *.* /e /sec /r:0 /w:0 /LOG:D:\CopyData.txt

          Comment

          Working...
          X