1.

Solve : xcopy and print log file help??

Answer»

Hi,

I have this batch FILES created xcopy d:\backupl g:\backup /e /c /i /f /h /d /y in WINDOWS XP.
The drive letter d: is the partition d: and the drive letter g: is a Firewire external HDD.

I don´t know hi, but in the last week the batch files doesn´t run until he is finishid, but i can´t see the error MESSAGE because the windows close to quickly and i can see...

I think that is possible to put a command file in this batch to write a LOG file to the HDD, and read the log file discoreved the error...?

I don´t know how to do it

Someone can help me please.

Thanks,

MigasMike
xcopy issues error codes that can be checked by a batch file.

0 Files were COPIED without error.
1 No files were found to copy.
2 The user pressed CTRL+C to terminate xcopy.
4 Initialization error occurred. There is not enough memory or disk space, or you entered an invalid
name or invalid syntax on the command line.
5 Disk write error occurred.

Something like this may work:

Code: [Select]xcopy d:\backupl g:\backup /e /c /i /f /h /d /y > file.log
if errorlevel 1 notepad file.log

You may have to use pathnames for the file.log depending where you want to put the log.

Hope this helps. 8-)



Discussion

No Comment Found