Solved Failure to copy file from batch

Microsoft Outlook 2010 (full product)
November 22, 2014 at 15:48:52
Specs: Windows 7, 8 Gb

I am executing the same batch file on 4 systems. This file performs command line McAfee scan and at the end it copies scan log file to remote shared folder. 2 PC's are Win7 and 2 are WinXP. I'm not sure if it's OS issue but copy works always on Win7 but failed on WinXP. In case it failed to copy on WinXP I go to prompt and perform copy command manually it worked but I need that it would be done using batch. Any suggestion what could cause the issue? Could it be that 'copy' behavious differently on XP v.s. Win7? Or something else .. like timing issue ...? Thanks in advance .. Note: LogFolder for each PC is different Here is my batch:

REM Perform a Full scan and log result

if exist "%ProgramFiles(x86)%" (
set "PATH_=%ProgramFiles(x86)%\McAfee\VirusScan Enterprise"
set SHUTDOWN=shutdown /s /f
) else (
set "PATH_=%ProgramFiles%\McAfee\VirusScan Enterprise"
set SHUTDOWN=shutdown -s -f

set LOGDIR=C:\McAfee
set DIR=\\xyz\LogFolder\


start /B copy %LOGDIR%\OnDemandScanLog.txt /Y "%DIR%"


See More: Failure to copy file from batch

Report •

November 22, 2014 at 20:57:41
✔ Best Answer
WinXP exposes a bug in your script that has chosen to Win7 protect you from.
copy %LOGDIR%\OnDemandScanLog.txt /Y "%DIR%"

How To Ask Questions The Smart Way

Report •
Related Solutions

Ask Question