abstract:
if errorlevel==1 goto :err
echo ^<div style="color=green"^>Copied ^<b^>%1.id^</b^> from %_srcdir% to %2\LNID ^<div^>>>"%_logfile%"
goto :end
:err
echo ^<div style="color=red"^>Failed to copy ^<b^>%1.id^</b^> from %_srcdir% to %2\LNID ^<div^>>>"%_logfile%"
:end
How do I parse out the blue, green and red data into separate files. Currently, all 3 end up in one big file.
= = = = = = = = = =
SET _logfile=S:\ISM\mSecAdm\SECLNIDS\NotesIDcopylog.html
SET _srcdir=S:\ISM\mSecAdm\SECLNIDS\NotesIDs
If EXIST "%_logfile%" DEL "%_logfile%"
FOR /F "tokens=1,2" %%i IN (homedirlist.txt) do call :doit %%i %%j
goto eof
:doit
If EXIST "%_srcdir%\%1.id" GOTO :cont
:: id file does not exist
echo ^<div style="color=blue"^>^<b^>%1.id^</b^> does not exist^<div^>>>"%_logfile%"
goto :end
:cont
md %2\LNID
copy "%_srcdir%\%1.id" %2\LNID
if errorlevel==1 goto :err
echo ^<div style="color=green"^>Copied ^<b^>%1.id^</b^> from %_srcdir% to %2\LNID ^<div^>>>"%_logfile%"
goto :end
:err
echo ^<div style="color=red"^>Failed to copy ^<b^>%1.id^</b^> from %_srcdir% to %2\LNID ^<div^>>>"%_logfile%"
:end |