ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    RoboCopy Syntax

    Scheduled Pinned Locked Moved IT Discussion
    6 Posts 4 Posters 248 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • gjacobseG
      gjacobse
      last edited by

      In playing around with RoboCopy, I’m seeing what I can do with it, as a replacement for copy or xcopy.

      I’ve run into a short wall in that I want to be able to copy a set list of folders/sub folders to a single folder.

      When I tried this, it failed and I’m in the process of sorting it out. I imagine it is a simple issue with my syntax.

      RoboCopy c:\users\gjacob\documents\ \\server1\department\g.jacob\_backup\ /e /zb
      

      The goal:
      Copy specific folders to the server as part of a profile backup

      1 Reply Last reply Reply Quote 0
      • pmonchoP
        pmoncho
        last edited by pmoncho

        Maybe not specific to what you need but this is a ps script I use to copy specific files I want. I believe it would work for folders also with the proper switches on the robocopy command.

        I will uncomment the "/L" line as a test to make sure I will get what I want before executing the file line.

        $files="C:\temp\file_list.txt"
        $SORC="C:\sorcfolder\temp\sorcfolder"
        $DEST="F:\destfolder\temp\desfolder"
        
        #Externally set input value as string
        [string[]] $arrayfromfile= @(Get-Content $files)
        #& robocopy /L $SORC $DEST $arrayfromfile
        #& robocopy $SORC $DEST $arrayfromfile
        
        1 Reply Last reply Reply Quote 0
        • gjacobseG
          gjacobse
          last edited by

          I feel that I’ve made decent progress on the script, that said, I’ve run into a snag trying to grab Google Chrome User default folder:

          RoboCopy “%src%\appdata\local\google\chrome\user data\default\” %dst%\chromeProfile\” /xa:sh /xjd /r:5 /w:5
          

          I can’t seem to isolate the issue, this is almost the same syntax I am using to copy the profile.

          JaredBuschJ black3dynamiteB 2 Replies Last reply Reply Quote 0
          • JaredBuschJ
            JaredBusch @gjacobse
            last edited by

            @gjacobse said in RoboCopy Syntax:

            I’ve run into a snag trying to grab Google Chrome User default folder:

            Don't use Chrome!

            1 Reply Last reply Reply Quote 0
            • black3dynamiteB
              black3dynamite @gjacobse
              last edited by

              @gjacobse said in RoboCopy Syntax:

              I feel that I’ve made decent progress on the script, that said, I’ve run into a snag trying to grab Google Chrome User default folder:

              RoboCopy “%src%\appdata\local\google\chrome\user data\default\” %dst%\chromeProfile\” /xa:sh /xjd /r:5 /w:5
              

              I can’t seem to isolate the issue, this is almost the same syntax I am using to copy the profile.

              Before you copy make sure Chrome processes is not running first. And last time I check, saved passwords doesn’t work when copying the chrome profile. I think Firefox is the only one that you can backup the profile without losing your saved passwords.

              gjacobseG 1 Reply Last reply Reply Quote 0
              • gjacobseG
                gjacobse @black3dynamite
                last edited by

                @black3dynamite said in RoboCopy Syntax:

                @gjacobse said in RoboCopy Syntax:

                I feel that I’ve made decent progress on the script, that said, I’ve run into a snag trying to grab Google Chrome User default folder:

                RoboCopy “%src%\appdata\local\google\chrome\user data\default\” %dst%\chromeProfile\” /xa:sh /xjd /r:5 /w:5
                

                I can’t seem to isolate the issue, this is almost the same syntax I am using to copy the profile.

                Before you copy make sure Chrome processes is not running first. And last time I check, saved passwords doesn’t work when copying the chrome profile. I think Firefox is the only one that you can backup the profile without losing your saved passwords.

                Good point, and I did run into that during a manual copy. I'm pretty sure that it would be a simple matter to added kill process - but I'll have to research that to see if it can be done by process name, not process number.

                Yes - I'll do that. Seems easy enough.

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post