• Quickly Verify Backup with Compare Command

    Home » Forums » AskWoody support » Windows » Windows 10 » Windows 10-other » Quickly Verify Backup with Compare Command

    Author
    Topic
    #2686042

    Quickly Verify Backup with Compare Command

     

    What

    Instructions how to quickly verify that files scheduled to be backed up were backed up and do represent a true, accurate copy of those files using the Compare command.

    Why

    If you have a setup where you have scheduled backup (aka: copying) of files while you are not using the PC and you wish to quickly find out that the backup was successful when you return to the PC, you can use the Compare command to do a quick check.

    Note:ย ย  These instructions are for Windows 10 but may work on other Windows versions.

    How

    • Select a file or folder that routinely changes between backups. I use my mail storage folder which changes daily to check my daily backups of my data files.
    • You will need the location of the original file and the location of the backup copy of that file. An easy way to get those Path addresses is to use File Explorer to go to the location of that file, select to highlight that file, and press the Copy Path icon on the Home tab.ย  Copy the Path address to both locations.
    • Open a Run box (WinKey +R), enter cmd, and press the Enter key. This will open a command window.
    • At the prompt enter comp and enter 1 space. Press WinKey + V to open the Clipboard and select the Path address you copied for the original file and enter 1 space after that address.ย  Press WinKey + V to open the Clipboard and select the Path address you copied for the Backup copy.ย  This will give a command that will look like the example below replacing Original and Backup with your Path addresses for those file locations.

    comp โ€œOriginalโ€ โ€œBackupโ€

    • Press the Enter key to run the compare of the two files/folders. Note:ย  The files being compared must not be in use when performing the compare.
    • If the command returns with Files compare OK then the two files are identical and a true copy has been made.
    • If the command returns with any kind error or that the files are not the same indicates the backup did not occur properly or the original file has been used and changed since being backed up.
    • Once you have run the command and know it works and since you will run this command often, highlight that command and copy with Crtl + C.ย  Open Notepad (enter notepad in Run box).ย  Paste the command in Notepad and save as a bat file such as DailyBkCk.bat.
    • Now to check if the backup went well is simply click the bat file and you will have a quick answer. You can even set the bat to run daily with Task Scheduler and have the open command window with the compare there to greet you without clicking any files.

    Comments

    Note:ย  After running the compare command the prompt will ask Compare more files? (Y/N).ย  Always answer N or close the command window.ย  Trying to compare more files with this compare more files option doesnโ€™t work and only returns an error stating that the files could not be found.

    HTH, Dana:))

    • This topic was modified 10 months, 3 weeks ago by Drcard:)).
    Reply To: Quickly Verify Backup with Compare Command

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: