Dumb robocopy problem

Discussion in 'Computers and Gadgets' started by TheKrell, Aug 1, 2019.

  1. TheKrell

    TheKrell Topic Starter A mighty and noble race originating on Altair IV. Pub Member / Supporter

    Joined:
    Jan 4, 2007
    Posts:
    24,787
    Likes Received:
    17,584
    Location:
    Fairfax, VA
    I'm trying to use robocopy to copy (with file protections) a folder on one disk to another disk on the same W10 computer. I can't get the stupid program to do anything! I have tried this from an admin command window:

    # robocopy "f:\My Old Directory" "e:\My New Directory" /copyall

    and the darn thing just says "skipped". :mad: I have Googled this issue (spaces in directory names) all day and the MS tech portal (along with everybody else on earth) says that is the correct form of the command. See anything wrong with it?
     
  2. TheForce

    TheForce SatelliteGuys Master Supporting Founder Pub Member / Supporter

    Joined:
    Oct 13, 2003
    Posts:
    27,510
    Likes Received:
    6,581
    Location:
    Earth
    We've addressed win10 file sharing issues elsewhere. There's even a firewall for your local network that you need to disable to use win10 file sharing in your local private LAN. If in windows 10 file explorer you can see the other computer in the Network you are well on your way to getting the dozens of settings right for file sharing. It's not only the sender that needs proper security and sharing settings, it's also the receiver that may be the one that is rejecting the copy command. Win 10 has a network trouble shooter but my experience is that rarely works unless it's something simple like your ethernet cable is not connected, which you should be able to see physically. I also have had bad luck with googling for an answer because most of the solutions are based on older versions of win10 so much of what they tell you no longer applies. Frustrating and as Clinton used to say- "I feel your pain."

    So far, the best solution was from harshness who suggested I install a network drive and that is working for me 90% of the time but it is slower than direct transfer. It could be 100% and just as fast if I change the way I do some things. His solution, unfortunately requires changes to the way you do things and how your hardware storage is structured.
     
  3. TheKrell

    TheKrell Topic Starter A mighty and noble race originating on Altair IV. Pub Member / Supporter

    Joined:
    Jan 4, 2007
    Posts:
    24,787
    Likes Received:
    17,584
    Location:
    Fairfax, VA
    Thank you Don but I'm lost. :confused: Is this post in the wrong thread? I'm trying to use robocopy between two disks on the same computer.
     
  4. klang

    klang SatelliteGuys Master Pub Member / Supporter Lifetime Supporter

    Joined:
    Nov 4, 2003
    Posts:
    5,336
    Likes Received:
    2,322
    Location:
    Colorado Springs, CO
    Try a space after the directory name before the closing quote. ie: "f:\My Old Directory "
     
    TheKrell likes this.
  5. TheKrell

    TheKrell Topic Starter A mighty and noble race originating on Altair IV. Pub Member / Supporter

    Joined:
    Jan 4, 2007
    Posts:
    24,787
    Likes Received:
    17,584
    Location:
    Fairfax, VA
    Thanks Klang. Yup; I tried that already with no effect. :( My understanding of that recommendation is that a \ is an escape character, and if you don't terminate your path with a \, then the space is not needed. (If you put \ in without a space, then the closing quote is gobbled.)

    This is driving me nuts. What perverse software engineer wrote this gnarly piece of software? It seemed so promising at first. What do I have to do? Boot up Linux and use rsync?
     
  6. TheForce

    TheForce SatelliteGuys Master Supporting Founder Pub Member / Supporter

    Joined:
    Oct 13, 2003
    Posts:
    27,510
    Likes Received:
    6,581
    Location:
    Earth
    sorry Krell, misunderstood. I always use "Copy" and "Paste" to a bunch of selected files or folders to do what you want to do. It has never failed.

    But in your post, I see you have included " in illogical places.
     
  7. harshness

    harshness SatelliteGuys Master

    Joined:
    May 5, 2007
    Posts:
    15,314
    Likes Received:
    2,178
    Location:
    Salem, OR
    I don't think robocopy has a force option but I'm assuming that there isn't anything at the destination before you run the command. Does the destination directory exist or has running the command put a directory or file by that name there?

    I get the feeling that whatever your actual command line is, it is trying to copy all the files to a single file and not a directory so after the first file is copied and given the destination as a name, any successive files are skipped because file destination already exists.

    You need to make sure you have write privileges on the destination. This can be a problem if the drive came from another computer or device and you haven't established ownership.

    If you use characters other than the basic non-white-space stuff in your file names, you're going to hate working in pretty much any command line environment.
     
  8. TheKrell

    TheKrell Topic Starter A mighty and noble race originating on Altair IV. Pub Member / Supporter

    Joined:
    Jan 4, 2007
    Posts:
    24,787
    Likes Received:
    17,584
    Location:
    Fairfax, VA
    No worries. I can't use copy/paste because it alters the file protections. I have about 1TB of small files in (usually) user-specific directories, and I can't lose those file privileges. Robocopy keeps them with the copyall switch.
    Yes, the source and target directories exist. The target directory is empty and remains empty. :crying I have tried this before without spaces in the pathnames and it worked. I accidentally created a new directory on my target disk once. :D The source disk was from another computer, but I can see all the files w/o issue as administrator. I'm lost. Windows drives me crazy.
     
  9. harshness

    harshness SatelliteGuys Master

    Joined:
    May 5, 2007
    Posts:
    15,314
    Likes Received:
    2,178
    Location:
    Salem, OR
    You've tried deleting the destination directory before invoking the command? I can see where it might get bent about the root directory of what you're trying to copy already existing (though you would perhaps expect it do copy it to a subdirectory of the same name).

    You mentioned using the backslash as an escape character, but Windows (both CMD and PowerShell) uses the carat (stupidly, the carat is valid in file and directory names). Whomever dreamed up the DOS parser was surely smoking printer ribbons and backup tape.

    Quotes, Escape Characters, Delimiters - Windows CMD - SS64.com
     
    TheKrell and Foxbat like this.
  10. harshness

    harshness SatelliteGuys Master

    Joined:
    May 5, 2007
    Posts:
    15,314
    Likes Received:
    2,178
    Location:
    Salem, OR
    Seeing a directory listing and being able to access the files named therein is two entirely different acts. Administrator rights in Windows aren't the same as superuser rights in *nix. Of course if you can type the files or load them into notepad, that's not the problem.

    I, and I suspect Don, have been through this a time or two and it can be a real bearcat to take over a disk from another installation as Windows assigns numbers to named accounts and they vary with each install.
     
    TheKrell likes this.
  11. Foxbat

    Foxbat Addicted to new HW Supporting Founder Lifetime Supporter

    Joined:
    Nov 25, 2003
    Posts:
    12,610
    Likes Received:
    4,526
    Location:
    Michiana
    In Windows 10, do you run the Command Shell/Powershell "As Administrator"? as opposed to just logging in with the Windows Administrator account and launching a CMD process?

    Also, if you type in icacls "F:\My Old Directory" what does it show for Privileges?
     
  12. TheKrell

    TheKrell Topic Starter A mighty and noble race originating on Altair IV. Pub Member / Supporter

    Joined:
    Jan 4, 2007
    Posts:
    24,787
    Likes Received:
    17,584
    Location:
    Fairfax, VA
    I didn't try that. I'll try it on Monday. Thanks for the suggestion.
    I did.
    Excellent idea. I've examined the privileges on the source disk using Properties, and I even added my admin account to the whole directory tree, without fixing this issue. But perhaps it's another one of those Windows utilities that silently does nothing. :( I'll try that command on Monday as well.
     
  13. TheKrell

    TheKrell Topic Starter A mighty and noble race originating on Altair IV. Pub Member / Supporter

    Joined:
    Jan 4, 2007
    Posts:
    24,787
    Likes Received:
    17,584
    Location:
    Fairfax, VA
    It shows this:

    NT AUTHORITY\Authenticated Users: (I)(OI)(CI)(F)
    NT AUTHORITY\SYSTEM: (I)(OI)(CI)(F)
    BUILTIN\Administrators: (I)(OI)(CI)(F)
    BUILTIN\USERS: (I)(OI)(CI)(F)
     
  14. Foxbat

    Foxbat Addicted to new HW Supporting Founder Lifetime Supporter

    Joined:
    Nov 25, 2003
    Posts:
    12,610
    Likes Received:
    4,526
    Location:
    Michiana
    Does not appear to be anything in the permissions since they're all (F). Unfortunately, I'm not a RoboCopy user so I'm not much help from here…
     
    TheKrell likes this.

Separate names with a comma.

More...