Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How to Find the File that is Causing the XCOPY Error  (Read 5600 times)

0 Members and 1 Guest are viewing this topic.

mcoad

    Topic Starter


    Newbie

    • Experience: Experienced
    • OS: Windows 8
    How to Find the File that is Causing the XCOPY Error
    « on: August 06, 2015, 08:45:40 AM »
    I use the xcopy command in a DOS batch file to backup my personal files and it works fine. However, when XCOPY encounters an error, the error message is displayed, but the offending filename is not. Only files that are successfully copied are displayed (to the screen or logfile) How do I pinpoint the file that is causing the error? Sometimes it's a long path name and the error is "Insufficient memory", but I still have no way of finding the offending file. Other times, the error might be "File creation error - The file cannot be accessed by the system". Same problem, I do not know the filename that is causing the error. The error message itself is not what I need help with. It's pinpointing the file that is causing the error, whatever that error might be. I need a way to display the filename BEFORE the copy is attempted. Thank you.

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: How to Find the File that is Causing the XCOPY Error
    « Reply #1 on: August 06, 2015, 09:21:38 AM »
    Show the code that you use. It will have to be modified 
     to log errors. It will run slower, but give you a report.

    Also, you may want to use ROBOCOPY.  Here is a link about using it to log errors.


    But there is no quick easy solution. You may have to log all file actions and then filter just the errors.



    foxidrive



      Specialist
    • Thanked: 268
    • Experience: Experienced
    • OS: Windows 8
    Re: How to Find the File that is Causing the XCOPY Error
    « Reply #2 on: August 06, 2015, 09:41:46 AM »
    The error message itself is not what I need help with. It's pinpointing the file that is causing the error, whatever that error might be. I need a way to display the filename BEFORE the copy is attempted. Thank you.

    This switch will give you a log if that is what you want.

      /F           Displays full source and destination file names while copying.