Announcement

Collapse
No announcement yet.

Does XCOPY /C suppress Abort,Retry, Fail?

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

  • Does XCOPY /C suppress Abort,Retry, Fail?

    Xcopy command help for MS-DOS and the Windows command line. Includes xcopy command availability, syntax, switches, and examples.

    XCOPY /C continues copying on errors
    1) Does XCOPY move to the next file or attempt copying the next sector in the same file if an error is detected?
    2) Does XCOPY/C suppress Abort, Retry, Fail message?
    I will have to use a corrupt floppy disk to test.
    If XCOPY/C suppresses Abort, Retry, Fail some changes need to be made.
    I had a call that a backup was fine, but when attempting to copy an individual file the user received Abort, Rety, Fail on the source hard disk. If the Abort,Retry, Fail is missed would be very bad if XCOPY /C suppresses the message.
    The world is full of apathy, but who cares?

  • #2
    > XCOPY/C suppresses Abort, Retry, Fail some changes need to be made.

    Send those new feature suggestions to:

    Mr. Steven Ballmer
    Microsoft Corporation
    One Microsoft Way
    Redmond WA 98052-6399
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Thanks, you don't know.
      The world is full of apathy, but who cares?

      Comment


      • #4
        It seems that /C flag with /Y doesn't suppressing the Windows error message and won't continue to write unless you press RETRY.

        May be you need to check drive before copying or use flag /V to verify the file after copy?

        Floppy might have a bad sector, but this appears after copying onto that sectros.. I faced with such problems many times. Resolved by replacing the floppy -

        Comment


        • #5
          Note, Abort, retry, fail was on a read from a hard disk.
          I'm going to replace XCOPY /c to XCOPY /v.
          The user replaced the hard disk.
          I was told they never received the abort, retry, fail messsage until after attempting
          to copy a single file that was located in the bad region. This can not be verified.
          Last edited by Mike Doty; 23 Jan 2009, 10:42 AM.
          The world is full of apathy, but who cares?

          Comment


          • #6
            Hi,

            open a CMD box and start ...

            XCOPY /? | more
            or
            XCOPY /? > XCopy.TXT

            then you will get all parameters from XCOPY ...
            Regards,
            Hubert

            ------------------------------------
            http://familie-brandel.de/index_e.html

            Comment


            • #7
              Mike.

              If you are in control of the PCs in question, you should definately take a look at RoboCopy, a utility MS first offered with the W2K Resource Kit. But you need minimum W2K to make it work.

              Being console based, RoboCopy can be seen as a supercharged XCOPY replacement that does a lot more than XCOPY ever did. It is fault tolerant - but only if you wish it to be - and you can make it report errors as they occur too. It sets out to do major unattended copy jobs.

              If you can, you should use the RoboCopy that came with the XP Resource Kit. It has even more features, features you'll want after using RoboCopy for a while but didn't know you needed without RoboCopy knowledge (or a similar program. Any alternatives? There is RSync - but that's LINUX).

              The RoboCopy from the XP Resource Kit need XP to run (of course). I don't know if there's a correspondingly newer RoboCopy for the Vista Resource Kit (nor Windows 7).

              The only problem I've found with RoboCopy (W2K and XP), is that they don't handle DST time shifts well, and that will force a differential/mirror copy to copy all files two times a year.


              ViH

              Comment


              • #8
                >you should definately take a look at RoboCopy

                ???

                I think you should look at either the SHFileOperation() Windows API function or maybe even (gasp!) the OPEN, GET, PUT and CLOSE statements in the PB help file.

                It is really hard for me to accept that in a venue provided by a COMPILER PUBLISHER, for COMPILER USERS - that is, PROGRAMMERS - anyone would be bleeping around trying to make a 20-year-old MS-DOS utility work to simply select and copy some files!!!

                MCM
                Michael Mattias
                Tal Systems (retired)
                Port Washington WI USA
                [email protected]
                http://www.talsystems.com

                Comment


                • #9
                  Originally posted by Vidar Hanto View Post
                  The RoboCopy from the XP Resource Kit need XP to run (of course). I don't know if there's a correspondingly newer RoboCopy for the Vista Resource Kit (nor Windows 7).
                  I read that it has been introduced as a standard feature of both Vista and Win Server 2008.

                  Bye!
                  -- The universe tends toward maximum irony. Don't push it.

                  File Extension Seeker - Metasearch engine for file extensions / file types
                  Online TrID file identifier | TrIDLib - Identify thousands of file formats

                  Comment


                  • #10
                    Mike,
                    Check out xxcopy http://www.xxcopy.com/index.htm
                    It is free for personal use and very well featured.
                    It has a command switch /clone that will perform an incremental mirror backup of a chosen directory or drive and works very well.
                    I have used it for a couple of years now.
                    I think that Joe Byrne pointed it out a few years ago in a cafe thread.
                    I routinely back up a few hundred GB and it takes about 10 minutes to update the external drive.
                    I think that it has all of the xcopy switches as a subset of its own commands.
                    Regards
                    Gary Barnes
                    The Control Key

                    If you are not part of the solution
                    then you are either a gas, solid, plasma or some other form of matter.

                    Comment


                    • #11
                      Yet another example: The "how" has been selected, yet we are never told the "what."

                      Just guessing this is some kind archive/backup application, where files are selected based on some fixed rule, such as "exists in source folder" or maybe "last update date is less than last backup date."

                      The requirements "apparently" include "must run unattended"

                      In this case the possible 'hows" include:
                      - Use system utility such as xcopy or MS-Backup
                      - Use third-party utiltiy such as Robocopy
                      - Write a program to select and copy

                      Maybe one of the utilities CAN support the "what;" but we don't know the "what."

                      I know I could probably write a program to do this in less time than it would take me to figure out and test the 'xcopy' syntax required, and for sure in less time than to acquire, install and configure something like "Robocopy."

                      I just have to wonder if options other than "xcopy" were even considered.

                      (This is a longstanding complaint of mine. No one should take anything personally).

                      MCM
                      Michael Mattias
                      Tal Systems (retired)
                      Port Washington WI USA
                      [email protected]
                      http://www.talsystems.com

                      Comment


                      • #12
                        Re the complete list of XCopy options (37 lines on my system):

                        I can only find these options which affect the user interface...
                        Code:
                         /P           Prompts you before creating each destination file.
                         /W           Prompts you to press a key before copying.
                         /Y           Overwrites existing files without prompting.
                         /-Y          Prompts you before overwriting existing files.
                        .. and only this to deal with error-handling
                        Code:
                         /C           Continues copying even if errors occur.
                        If one needs better control of error situations I think SHFIleOperation() or even PB FILECOPY offer better options - assuming you do your copies one file at a time.

                        Or maybe 'loss of control' is the just the cost of using wildcards in your filespecs?

                        Then again, I 'assuming' wildcards are in use..since application is not described.

                        Complete explanation of all MS command-line utilities:

                        Command Line Reference A-Z
                        Michael Mattias
                        Tal Systems (retired)
                        Port Washington WI USA
                        [email protected]tems.com
                        http://www.talsystems.com

                        Comment


                        • #13
                          does xcopy /c detect abort, retyr, fail

                          The question was whether xcopy /c detects abort, retry, fail and pauses.
                          Solution, placed into a callable batch file:
                          format /q/x/y/v:backup z:
                          xcopy /v/e/h/r/y *.* z:\important\*.*
                          xcopy /v/e/h/r/y c:\junk\*.* z:\junk\*.*
                          pause
                          Format can greatly decrease the time rewriting to a flash drive.
                          The /c continue on error has been replaced with /v verify after copy.

                          Getting off subject:
                          For backup I use:
                          1) XXCLONE
                          2) Acronis True Image
                          3) XCOPY /v/e/h/r/y (for quick, take with me backup)
                          4) Batch file that FTP's many zipped files up the net.
                          The world is full of apathy, but who cares?

                          Comment


                          • #14
                            You are right Michael, the 'what' wasn't addressed and this forced me to read Mikes post properly.

                            If /C forces Abort, Retry, Fail to be ignored then it would be useless for flagging errors caused by a hardware problem like a bad disk sector.
                            If the mechanism for running xcopy without /c is a batch file then the execution of the batch file would stop at that point until the user responds with the appropriate key press.

                            No chance then for error trapping via a returned exit code or similar.
                            Furthermore if xcopy is used with a wildcard then there probably isn't a way to extract the file name of the corrupt file as you noted previously.
                            I know that xxcopy will return an error code if a copy fails, but it would seem that the only sensible way to use it this way would be to process each file individually, no wildcards in other words.

                            So if you need complete control over the copy process then PB's filecopy, or the Windows API would be a much better solution as you can programmatically adapt the desired response to your exact requirements.
                            The Abort, Retry, Fail will still occur as a run time error, but can presumably be handled within the program.

                            If the behaviour of XP's version of xcopy is the same as the DOS version then a faulty sector will be written out as rubbish to the destination file, but the rest of it should be copied faithfully. Not much use though as the destination file might still be unuseable.

                            Another problem with xcopy and /c is if the source file is locked.
                            Xcopy will not only skip the copy, but also delete the destination file (if it exists on the destination media) leaving you without your previously backed up file.

                            It would seem that any method used to back up critical files should include opening the source file and attempting to read it first. This should allow the OS to flag a problem via a trappable error of some sort thus allowing the user or program to select an appropriate response before a copy is attempted.
                            Similarly the integrity of the destination media should be checked before a copy is attempted. This would be more difficult as the OS determines where the copy would be physically located.

                            I suppose that you could open the source in Binary mode, use a buffer that is the same size as the allocation size of the destination and verify each chunk as it is written. This also would allow the processing of any errors as they occur which at least gives you the opportunity to alert the user that the destination is corrupt and suggest that a new floppy, thumbdrive or whatever be used.

                            This has forced me to re-evaluate my own backup procedures because I simply do not know what xxcopy will do in the event of a hardware problem and having it possibly delete existing files on the destination drive is not acceptable to me for obvious reasons.

                            So thanks Michael for pointing out what are now obvious problems with my own backup procedures and hopefully this will be useful for others as well.

                            Regards
                            Gary Barnes
                            The Control Key

                            If you are not part of the solution
                            then you are either a gas, solid, plasma or some other form of matter.

                            Comment


                            • #15
                              I am glad Michael was helpful.
                              Backup to a different folder or destination with each backup will solve one of the problems mentioned.
                              Similarly the integrity of the destination media should be checked before a copy is attempted. This would be more difficult as the OS determines where the copy would be physically located.
                              Notice in my example that format was used on the destination. That also addresses an issue.
                              Also, temporary files, user created files and subfolders may also need to be copied. You may not have a list.
                              I believe XCOPY is very good.
                              Solution, placed into a callable batch file:
                              format /q/x/y/v:backup z:
                              xcopy /v/e/h/r/y *.* z:\important\*.*
                              xcopy /v/e/h/r/y c:\junk\*.* z:\junk\*.*
                              pause
                              Format can greatly decrease the time rewriting to a flash drive.
                              The /c continue on error has been replaced with /v verify after copy.
                              Last edited by Mike Doty; 24 Jan 2009, 01:51 PM.
                              The world is full of apathy, but who cares?

                              Comment


                              • #16
                                Maybe one of the utilities CAN support the "what;" but we don't know the "what."

                                I know I could probably write a program to do this in less time than it would take me to figure out and test the 'xcopy' syntax required, and for sure in less time than to acquire, install and configure something like "Robocopy."

                                I just have to wonder if options other than "xcopy" were even considered.

                                (This is a longstanding complaint of mine. No one should take anything personally).
                                Michael,
                                Yes, other things are always considered.
                                It sounds like you didn't take the time to use XCOPY.
                                The world is full of apathy, but who cares?

                                Comment


                                • #17
                                  Fair enough Mike,
                                  I was still typing my post when you posted that you were using a Flash Drive and formatting it before doing the backup.
                                  A most sensible solution that neatly takes care of the destination integrity issue.
                                  Regards
                                  Gary Barnes
                                  The Control Key

                                  If you are not part of the solution
                                  then you are either a gas, solid, plasma or some other form of matter.

                                  Comment


                                  • #18
                                    Originally posted by Vidar Hanto
                                    I don't know if there's a correspondingly newer RoboCopy for the Vista Resource Kit (nor Windows 7).
                                    RoboCopy is included with Windows Vista and Windows 7. Xcopy has been deprecated in favor of RoboCopy.

                                    In my opinion, RoboCopy is much better than Xcopy.
                                    Last edited by Greg Lyon; 24 Jan 2009, 09:21 PM.

                                    Comment


                                    • #19
                                      Thanks, Greg!
                                      At least they didn't dump XCOPY.
                                      I'm reading the options with ROBOCOPY.
                                      The /MIR (Mirror a complete directory tree looks interesting.)

                                      /MON run again in m minutes Time, if changed.

                                      No /c continue on error option (the subject of this thread)
                                      No /v verify option

                                      /IT include Tweaked files. I'm sure we all know what that is.
                                      What is a tweaked file?



                                      ·
                                      Copy a new class of file : “Tweaked” files.
                                      Use
                                      /IT to include and process Tweaked files.
                                      A Tweaked file is defined to be one that exists in both the source and destination,
                                      with identical size and timestamp, but different attribute settings.

                                      Form more information see “Robocopy File Classes” later in this document.




                                      -------------------------------------------------------------------------------
                                      ROBOCOPY :: Robust File Copy for Windows
                                      -------------------------------------------------------------------------------
                                      Started : Sat Jan 24 21:37:27 2009
                                      Usage :: ROBOCOPY source destination [file [file]...] [options]
                                      source :: Source Directory (drive:\path or \\server\share\path).
                                      destination :: Destination Dir (drive:\path or \\server\share\path).
                                      file :: File(s) to copy (names/wildcards: default is "*.*").
                                      ::
                                      :: Copy options :
                                      ::
                                      /S :: copy Subdirectories, but not empty ones.
                                      /E :: copy subdirectories, including Empty ones.
                                      /LEV:n :: only copy the top n LEVels of the source directory tree.
                                      /Z :: copy files in restartable mode.
                                      /B :: copy files in Backup mode.
                                      /ZB :: use restartable mode; if access denied use Backup mode.
                                      /EFSRAW :: copy all encrypted files in EFS RAW mode.
                                      /COPY:copyflag[s] :: what to COPY for files (default is /COPYAT).
                                      (copyflags : D=Data, A=Attributes, T=Timestamps).
                                      (S=Security=NTFS ACLs, O=Owner info, U=aUditing info).
                                      /DCOPY:T :: COPY Directory Timestamps.
                                      /SEC :: copy files with SECurity (equivalent to /COPYATS).
                                      /COPYALL :: COPY ALL file info (equivalent to /COPYATSOU).
                                      /NOCOPY :: COPY NO file info (useful with /PURGE).
                                      /SECFIX :: FIX file SECurity on all files, even skipped files.
                                      /TIMFIX :: FIX file TIMes on all files, even skipped files.
                                      /PURGE :: delete dest files/dirs that no longer exist in source.
                                      /MIR :: MIRror a directory tree (equivalent to /E plus /PURGE).
                                      /MOV :: MOVe files (delete from source after copying).
                                      /MOVE :: MOVE files AND dirs (delete from source after copying).
                                      /A+:[RASHCNET] :: add the given Attributes to copied files.
                                      /A-:[RASHCNET] :: remove the given Attributes from copied files.
                                      /CREATE :: CREATE directory tree and zero-length files only.
                                      /FAT :: create destination files using 8.3 FAT file names only.
                                      /256 :: turn off very long path (> 256 characters) support.
                                      /MON:n :: MONitor source; run again when more than n changes seen.
                                      /MOT:m :: MOnitor source; run again in m minutes Time, if changed.
                                      /RH:hhmm-hhmm :: Run Hours - times when new copies may be started.
                                      /PF :: check run hours on a Per File (not per pass) basis.
                                      /IPG:n :: Inter-Packet Gap (ms), to free bandwidth on slow lines.
                                      /SL :: copy symbolic links versus the target.
                                      /MT[:n] :: Do multi-threaded copies with n threads (default 8).
                                      n must be at least 1 and not greater than 128.
                                      This option is incompatible with the /IPG and /EFSRAW options.
                                      Redirect output using /LOG option for better performance.
                                      ::
                                      :: File Selection Options :
                                      ::
                                      /A :: copy only files with the Archive attribute set.
                                      /M :: copy only files with the Archive attribute and reset it.
                                      /IA:[RASHCNETO] :: Include only files with any of the given Attributes set.
                                      /XA:[RASHCNETO] :: eXclude files with any of the given Attributes set.
                                      /XF file [file]... :: eXclude Files matching given names/paths/wildcards.
                                      /XD dirs [dirs]... :: eXclude Directories matching given names/paths.
                                      /XC :: eXclude Changed files.
                                      /XN :: eXclude Newer files.
                                      /XO :: eXclude Older files.
                                      /XX :: eXclude eXtra files and directories.
                                      /XL :: eXclude Lonely files and directories.
                                      /IS :: Include Same files.
                                      /IT :: Include Tweaked files.
                                      /MAX:n :: MAXimum file size - exclude files bigger than n bytes.
                                      /MIN:n :: MINimum file size - exclude files smaller than n bytes.
                                      /MAXAGE:n :: MAXimum file AGE - exclude files older than n days/date.
                                      /MINAGE:n :: MINimum file AGE - exclude files newer than n days/date.
                                      /MAXLAD:n :: MAXimum Last Access Date - exclude files unused since n.
                                      /MINLAD:n :: MINimum Last Access Date - exclude files used since n.
                                      (If n < 1900 then n = n days, else n = YYYYMMDD date).
                                      /XJ :: eXclude Junction points. (normally included by default).
                                      /FFT :: assume FAT File Times (2-second granularity).
                                      /DST :: compensate for one-hour DST time differences.
                                      /XJD :: eXclude Junction points for Directories.
                                      /XJF :: eXclude Junction points for Files.
                                      ::
                                      :: Retry Options :
                                      ::
                                      /R:n :: number of Retries on failed copies: default 1 million.
                                      /W:n :: Wait time between retries: default is 30 seconds.
                                      /REG :: Save /R:n and /W:n in the Registry as default settings.
                                      /TBD :: wait for sharenames To Be Defined (retry error 67).
                                      ::
                                      :: Logging Options :
                                      ::
                                      /L :: List only - don't copy, timestamp or delete any files.
                                      /X :: report all eXtra files, not just those selected.
                                      /V :: produce Verbose output, showing skipped files.
                                      /TS :: include source file Time Stamps in the output.
                                      /FP :: include Full Pathname of files in the output.
                                      /BYTES :: Print sizes as bytes.
                                      /NS :: No Size - don't log file sizes.
                                      /NC :: No Class - don't log file classes.
                                      /NFL :: No File List - don't log file names.
                                      /NDL :: No Directory List - don't log directory names.
                                      /NP :: No Progress - don't display percentage copied.
                                      /ETA :: show Estimated Time of Arrival of copied files.
                                      /LOG:file :: output status to LOG file (overwrite existing log).
                                      /LOG+:file :: output status to LOG file (append to existing log).
                                      /UNILOG:file :: output status to LOG file as UNICODE (overwrite existing log).
                                      /UNILOG+:file :: output status to LOG file as UNICODE (append to existing log).
                                      /TEE :: output to console window, as well as the log file.
                                      /NJH :: No Job Header.
                                      /NJS :: No Job Summary.
                                      /UNICODE :: output status as UNICODE.
                                      ::
                                      :: Job Options :
                                      ::
                                      /JOB:jobname :: take parameters from the named JOB file.
                                      /SAVE:jobname :: SAVE parameters to the named job file
                                      /QUIT :: QUIT after processing command line (to view parameters).
                                      /NOSD :: NO Source Directory is specified.
                                      /NODD :: NO Destination Directory is specified.
                                      /IF :: Include the following Files.
                                      Last edited by Mike Doty; 24 Jan 2009, 09:53 PM.
                                      The world is full of apathy, but who cares?

                                      Comment


                                      • #20
                                        Mike,

                                        I usually use the /MIR option and haven't needed much else. The /XF, /XD and /XJD exclude options are handy at times and the /FFT option is handy when copying to CD.

                                        There was a really good, detailed article about using RoboCopy but I haven't been able to find it. If I do I'll post a link to it.

                                        [Edit] Yes, the .pdf file you found is the one I was thinking of.

                                        Oh, I also set /R:3 /REG so that it quits retrying after the third failed copy.

                                        As far as your original question about Abort, Retry Fail?, I don't know.
                                        Last edited by Greg Lyon; 24 Jan 2009, 10:36 PM.

                                        Comment

                                        Working...
                                        X