Script to compare directory size

Home Forums Scripting General Scripting Script to compare directory size

Viewing 1 post (of 1 total)
  • Author
  • Avatar


    I am writing a script to copy files from place to another in preperation for tape backup. I want to compare the source directory to the destination directory to make sure that the files were copied successfully, but I am stuck. Here is the script:

    verify on
    echo Transfer Begins: >> C:daily.txt
    date /t >>C:daily.txt
    echo at >>C:daily.txt
    time /t >>C:daily.txt

    xcopy \[DIRECTORY]*.* \[DIRECTORY]BACKUP /s /h /y /c >>C:daily.txt

    echo Transfer Ends: >> C:daily.txt
    echo Source Size >>c:daily.txt
    c:dl*.* -N \[DIRECTORY] >>c:daily.txt
    echo Destination Size >>c:daily.txt
    c:dl*.* -N \[DIRECTORY]backup >>c:daily.txt
    date /t >>C:daily.txt
    echo at >>C:daily.txt
    time /t >>C:daily.txt
    echo ====================================================== >>C:daily.txt
    type c:backup.txt >>C:daily.txt
    del c:backup.txt
    rename c:daily.txt backup.txt

    I am using a freeware DOS tool called DL but this only prints the size of the files in the directory, and does not recurse through the subdirectories.

    Does anyone have any ideas? BTW, I am happy to use vbscript to do this if it is necessary.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.