Batch script - xcopy and log
Posted: 27 Jun 2011 06:04
Hi Guys,
I have the following code here but not sure why isnt it working..Please note that is the format. I believe there is an error for having it too long?
Please also note that "&Q192&" etc. are excel cells
If someone can help me fix the following I would appreciate it =)
I have the following code here but not sure why isnt it working..Please note that is the format. I believe there is an error for having it too long?
Please also note that "&Q192&" etc. are excel cells
If someone can help me fix the following I would appreciate it =)
Code: Select all
set src="&Q192&"
& set dest="&R192&" &
if not exist "%src%"(if not exist "%dest%"
(echo.FAIL Source: %src% and Destination: %dest% not found>>log.txt)
else (echo.FAIL Source: %src% not found>>log.txt))
else (if not exist
(echo.FAIL Destination: %dest% not found>>log.txt)
else
(echo.PASS Source: %src% Destination: %dest%>>log.txt
xcopy /f /s /y %src% %dest% >>log.txt &echo.>>log.txt))