• 0

Batch file command

  • 0

I’m writing a Batch file that copies a 695 meg file from the CD to the C: drive (checks to see if the entire file actually coppied) then prompts the user to unsert the next CD to copy the next file. The only trouble I’m having is how to (Check to see if the entire file actually coppied)… I need something in the batch file that compares the size of two files, and if they are the same, then it exits with errorlevel=0, and if not, errorlevel=1. I greatly appriciate any help anyone can give me on this!! Thank’s in advance, 1Tech


0 Answers

  1. @echo off
    fc c:filename r:filemame > nul
    if errorlevel 1 goto error

    echo insert next CD
    goto main

    echo failed check


    If at first you don’t succeed, you’re about average.

    • 0