Hi Everyone,
I've been poking around ad this for a few days and can't seem to come up with an answer.
I am using an old school batch file calling the xcopy function to back up some OEM equipment files.
This works fine except I don't really need to log ALL the files that are backed up which comes from my highlighted text.
The resulting log file produces this:
-------------------------
NetworkCopy Started: Fri 10/16/2009 14:32:36.12
C:\test\Lead_Forming.mdb
C:\test\New Text Document.txt
C:\test\winzip.log
3 File(s) copied
Files Copied Without Error
NetworkCopy Ended: Fri 10/16/2009 14:32:36.50
-------------------------
This is only a test folder. The folders I am copying have 1000's of files. I of course don't need a log of all the file names that were copied. However I would still like to list the number of files that were copied as well as only a list of those files that WERE NOT copied or had a problem.
Is there an easy way to do this?
Thanks,
Craig
I've been poking around ad this for a few days and can't seem to come up with an answer.
I am using an old school batch file calling the xcopy function to back up some OEM equipment files.
Code:
IF EXIST C:\BackupLog.TXT GOTO LOG
:CREATE
ECHO Backup Log > C:\BackupLog.TXT
ECHO. >> C:\BackupLog.TXT
:LOG
Echo ------------------------- >> C:\BackupLog.TXT
Echo NetworkCopy Started: %date% %time% >> C:\BackupLog.TXT
xcopy /e/h/r/y "c:\test" "Y:\test"[COLOR=Red][B] >> C:\BackupLog.TXT[/B][/COLOR]
If ErrorLevel 0 Echo Files Copied Without Error >> C:\BackupLog.TXT
If ErrorLevel 1 Echo No Files Found to Copy >> C:\BackupLog.TXT
If ErrorLevel 2 Echo User Pressed CTRL+C To Stop Backup >> C:\BackupLog.TXT
If ErrorLevel 4 Echo Invalid Drive or Low Memory >> C:\BackupLog.TXT
If ErrorLevel 5 Echo Disk Write Error Occured >> C:\BackupLog.TXT
Echo NetworkCopy Ended: %date% %time% >> C:\BackupLog.TXT
Echo ------------------------- >> C:\BackupLog.TXT
cls
@Exit
This works fine except I don't really need to log ALL the files that are backed up which comes from my highlighted text.
The resulting log file produces this:
-------------------------
NetworkCopy Started: Fri 10/16/2009 14:32:36.12
C:\test\Lead_Forming.mdb
C:\test\New Text Document.txt
C:\test\winzip.log
3 File(s) copied
Files Copied Without Error
NetworkCopy Ended: Fri 10/16/2009 14:32:36.50
-------------------------
This is only a test folder. The folders I am copying have 1000's of files. I of course don't need a log of all the file names that were copied. However I would still like to list the number of files that were copied as well as only a list of those files that WERE NOT copied or had a problem.
Is there an easy way to do this?
Thanks,
Craig