none
robocopy creates root directory inside the destination

    Question

  • So as far as I can tell my robocopy is behaving very strangely. There are quite a few posts of people asking how to get robocopy to create the root dir, the answer is always to create it first at destination or include it in destination patch, etc.

    I'm having opposite problem.

    robocopy "C:\Users\Emily\Pictures" "S:\Photo Storage"  /s /z /mt

    When it completes I have S:\Photo Storage\Pictures\....

    I want just S:\Photo Storage\... without it creating the root Pictures dir.

    Thanks

    Sunday, March 09, 2014 5:59 PM

Answers

  • Hi TechnoCore,

    I'm a little confused, because I have two folders: Source folder:E:\2 Destination Folder:E:\1

    Run "robocopy "e:\2" "e:\1"  /s /z /mt" and I Get "e:\1\...."

    Run "Copy-Item e:\2 -Destination e:\1 -Recurse -force" in windows powershell and I Get "e:\1\2\..."

    If you want to copy files without the directory, you can just run the robocopy.

    If I have any misunderstanding, please let me know.

    Best Regards,

    Anna 

    Monday, March 10, 2014 5:01 PM
    Moderator