batch file to track information and open external excel 2010 file with vba -
i writing batch
file when run captures windows login, date, , time. place counter in batch
tracks if batch file opened , increments 1 if answer second question (in bold) "y". if counter = 1
message displays message along username, date, , time (in italics). if answer either of questions "n" "goodbye" displayed , batch
closes. getting syntax errors , need help. thank :).
new batch file
@echo off :: ask user :choice set /p c=has check been done [y/n] if /i %c%==y ( set /p c=do want send dose report[y/n]? ) :: count loop set var1=0 :loop set /a var1=%var1%+1 if %var1% equ 1 ( goto :end ) else ( goto :loop ) :end echo "the dose report has been sent %username% on %date% @ %time%" else if /i not %c% ==n goto goodbye if /i %c%==y ( "l:\ngs\hla lab\total quality management\qc & qa\dose reports\dose reporting form.xlsm" ) else if /i not %c%==n goto goodbye :goodbye echo "goodbye" timeout 2 /nobreak exit end
current display on screen
1 "the dose report has been sent cmccabe on tue 10/27/2015 @ 11:00:20. 21" has check been done [y/n]
i not quite understanding description of program die hard fan of specific formatting , syntax of batch files. receive no syntax errors when execute code this.
@echo off :: count loop set var1=0 :loop set /a var1=%var1%+1 echo %var1% if %var1% equ 1 ( goto end ) else ( goto loop ) :end echo "the dose report has been sent %username% on %date% @ %time%" :: ask user :choice set /p c=has check been done [y/n] if /i %c%==y ( set /p c=do want send dose report[y/n]? ) else ( if /i %c%==n goto goodbye ) if /i %c%==y ( echo "l:\ngs\hla lab\total quality management\qc & qa\dose reports\dose reporting form.xlsm" ) else ( if /i %c%==n goto goodbye ) :goodbye echo "goodbye" pause
Comments
Post a Comment