Without downloading a utility or using a for loop, are there any tricks to get an ECHO to go to (2) separate files in one line?
For instance, here is a portion of my script:
Code: Select all
::-- Begin Script Processing --::
>>%LOGFILE% (
ECHO ********************************************************
ECHO %~n0 Starting at %TIME%
ECHO ********************************************************
ECHO.
ECHO ********************************************************
ECHO Login to PBCS
ECHO ********************************************************
ECHO.
ECHO Action : Login
ECHO Login : %LOGINID%
ECHO Password : %PASSWORD%
ECHO PBCS URL : %URL%
ECHO Domain : %DOMAIN%
ECHO --------------------------------------------------------
ECHO.
)
ECHO Login to PBCS...
PING -n %DELAY% 127.0.0.1>nul
ECHO CALL epmautomate login %LOGINID% %PASSWORD% %URL% %DOMAIN% >nul 2>&1 && (
ECHO PBCS Login^: Successful >>%LOGFILE%
) || (
ECHO PBCS Login^: Failed >>%LOGFILE%
SET "ERR1=T"& GOTO END
)
CLS
Is there a way to get it to go to both? I'd like to try to avoid the following unless it's not possible:
Code: Select all
FOR %%F IN ( %ERRORFILE% %LOGFILE%) DO ECHO PBCS Login^: Failed >>%%F