delphi programming forums mysql charset mget recursive synonimos
free ventrilo servers hosting cs javascript delay python find in list
Back Forum New
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

TOP

What language is this written in? I've never even seen this before. If a MODERATOR knows this language can they move it to appropriate place?

TOP


Originally Posted by groundscape
What language is this written in? I've never even seen this before. If a MODERATOR knows this language can they move it to appropriate place?
Not sure.  It's in a .bat file...

TOP


Originally Posted by medialint
Its a DOS BAT not anything like VB ... ;-) Probably should be doz I guess but I don't want to punt it again.
I found out it was created from a DOS prompt.  I will take any solution that makes it work - any language...



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

TOP

Back Forum