C
Charles Theodore
Hi,
Running windows xp and don't want third party to accomplish the task.
Have found two ways in this newsgroup to make the task, but it is not
exactly correct.
I want to be able to log the output only when the batch file make an
action in the directories. In this example, be able to create an INPUT
dir when needed and log it in logfile.log and not log all the
processing. Is it possible?
A) batch.cmd>>lofile.log >2&1 ---> only output the entire processing
of batch.
B) Put the following code in the existing batch file: ---> only output
the entire processing of batch.
@ECHO ON & setlocal
call :Logit>>batch.log 2>&1
exit /b 0
:Logit
set pathx=\\filesrv1\MSI
for /f "delims=" %%A in ('dir/B/S/A-D "%pathx%\*.zap"'
) do if not exist "%%~dpAINPUT" md "%%~dpAINPUT"
Thanks in advance.
Running windows xp and don't want third party to accomplish the task.
Have found two ways in this newsgroup to make the task, but it is not
exactly correct.
I want to be able to log the output only when the batch file make an
action in the directories. In this example, be able to create an INPUT
dir when needed and log it in logfile.log and not log all the
processing. Is it possible?
A) batch.cmd>>lofile.log >2&1 ---> only output the entire processing
of batch.
B) Put the following code in the existing batch file: ---> only output
the entire processing of batch.
@ECHO ON & setlocal
call :Logit>>batch.log 2>&1
exit /b 0
:Logit
set pathx=\\filesrv1\MSI
for /f "delims=" %%A in ('dir/B/S/A-D "%pathx%\*.zap"'
) do if not exist "%%~dpAINPUT" md "%%~dpAINPUT"
Thanks in advance.