Announcement

Collapse
No announcement yet.

Robocopy log issues

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

  • Robocopy log issues

    Hi i dont know if this is the correct section for this, so please forgive me.

    i have been using robocopy to copy a folder from one location to another on same drive. Robocopy does the copying ok with no errors, the log that robocopy producrs shows that all files and folder copied without a problem, however when i compare folder size, files and folders numbers they are different. these to only happen with large folders. small folders logs and compares the same.

    the source folder is hidden, dont know if this plays a part. but i have unhidden it and it still does the same.

    any advice would be gratefully revived.

    thank you

  • #2
    Re: Robocopy log issues

    I think this should probably be int he scripting section but i'll leave it for now.

    Can you show the switches that you are using to transfer the folder.

    Comment


    • #3
      Re: Robocopy log issues

      Code:
      @echo off
       
      for /f "tokens=1,2,3,4,5,6,7 delims=/:." %%i in ( "%DATE: =0%/%TIME: =0%" ) do set TIMESTAMP=%%k%%j%%i%%l%%m%%n%%o
       
      set ORIGIN=P Archive
      set SOURCE=******\******\*****\%ORIGIN%
      set TARGET=******\*******\Archive-del01122014\pdrive\%ORIGIN%
       
      for /f "tokens=1 delims=\" %%i in ( "%SOURCE%" ) do set SERVER=%%i
      
       
      robocopy "\\%SOURCE%" "\\%TARGET%" /COPY:DATSO /E /Z /R:3 /W:10 /LOG+:"%SERVER%.%ORIGIN%.%TIMESTAMP%.LOG" /TEE /V /FP /NP

      when i run the script there are no errors
      Last edited by wullieb1; 11th December 2012, 11:54.

      Comment


      • #4
        Re: Robocopy log issues

        Edited to wrap the code in code tags.

        Moving to the General Scripting forum.

        FWIW it looks fine to me but i would remove the \\ from the source and destination.

        Comment


        • #5
          Re: Robocopy log issues

          thanks, just hope it doesnt get forgotten here

          Comment


          • #6
            Re: Robocopy log issues

            Are you running the script with the highest privileges?
            Are there discrepancies between the file and folder count?

            Also, if you want your script to run faster I would remove the /TEE switch. Also consider changing /Z to /ZB. If it fails with restartable then it will try backup mode.
            Regards,
            Jeremy

            Network Consultant/Engineer
            Baltimore - Washington area and beyond
            www.gma-cpa.com

            Comment


            • #7
              Re: Robocopy log issues

              yes i have the highest privilages,
              and yes there are discrepancies between the file and folder count.

              the script works with folder less then 1gb big anything above that it causes the problem

              Comment


              • #8
                Re: Robocopy log issues

                What OS? If Vista or later are you running the script by right-clicking and selecting "Run as administrator" or are you just double clicking it?

                Could you post the stats from the logs on one of the copy jobs that doesn't copy everything?
                Regards,
                Jeremy

                Network Consultant/Engineer
                Baltimore - Washington area and beyond
                www.gma-cpa.com

                Comment


                • #9
                  Re: Robocopy log issues

                  im running it in Window xp.


                  Code:
                             Total    Copied   Skipped  Mismatch    FAILED    Extras
                       Dirs :      2939      2939         0         0         0         0
                      Files :     53511     53511         0         0         0         0
                      Bytes :   9.442 g   9.442 g         0         0         0         0
                      Times :   0:26:51   0:25:48                       0:00:00   0:01:02
                  
                      Speed :             6545650 Bytes/sec.
                      Speed :             374.545 MegaBytes/min.
                  
                      Ended : Tue Dec 04 11:49:02 2012
                  here are the stats

                  Comment


                  • #10
                    Re: Robocopy log issues

                    Interesting. Do you have the same permissions on the source and destinations?
                    Is the source and destination both formatted with NTFS?
                    Regards,
                    Jeremy

                    Network Consultant/Engineer
                    Baltimore - Washington area and beyond
                    www.gma-cpa.com

                    Comment


                    • #11
                      Re: Robocopy log issues

                      yep same permissions. i also used roadkills unstoppable copier, and that also reports no errors, but when i compare folder size by going to properties on each folder they are different.

                      Comment


                      • #12
                        Re: Robocopy log issues

                        Originally posted by almeidap80 View Post
                        the log that robocopy producrs shows that all files and folder copied without a problem, however when i compare folder size, files and folders numbers they are different.
                        I assume the folders counted in and the total size of the destination folder are both less than what is showed in the properties of the source?

                        The number of copied "Dirs" listed in the logs is that the same amount of folders that is showed in the properties of the source folder, or of the destination folder?

                        Can you test by copying the files and folders from the just created destination folder back to a folder on the origional source drive, using the same robocopy command. Compare the sizes and number of folders now.


                        It maybe has something to do with locked files (although I would expect to see that in the log) or with directory symbolic links.

                        /Rems
                        Last edited by Rems; 13th December 2012, 21:27.

                        This posting is provided "AS IS" with no warranties, and confers no rights.

                        __________________

                        ** Remember to give credit where credit's due **
                        and leave Reputation Points for meaningful posts

                        Comment


                        • #13
                          Re: Robocopy log issues

                          i think i found out the problem its the file names are too long is there something that can be added to my script to copy the files even if the file name is too long?

                          Comment


                          • #14
                            Re: Robocopy log issues

                            Ah, that would cause the source and destination to show different sizes in Windows Explorer.

                            But the does the robocopy log show the proper amount? Robocopy should work fine regardless of the path and name length. If the log shows the right amount copied then all your data has been successfully copied over.

                            You have a few options:
                            1. Map a drive to a point lower in the folder hierarchy and you should then be able to access the content
                            2. Shorten names or eliminate folders higher in the hierarchy so that you don't reach the 256 character limit.
                            Regards,
                            Jeremy

                            Network Consultant/Engineer
                            Baltimore - Washington area and beyond
                            www.gma-cpa.com

                            Comment


                            • #15
                              Re: Robocopy log issues

                              \\?\ would that be used?

                              Comment

                              Working...
                              X