|
Answer» Have the FOLLOWING testing script. And I'm trying to have it open a new cmd window and have it display the contents of a text file. The contents of the file at this stage are just some ramblings, but when INCORPORATED to production will contain the output of SQL Logfiles.
Any pointers with the following appreciated...
Code: [Select]@echo off
@echo. @echo ... This is a TEST bacth job ... @echo. @echo. @echo. @echo. @echo. Attempting to display another file in another window... @echo.
[highlight]cmd.exe /Q /C"type c:\SOMEFILE.txt && @echo. && pause"[/highlight]
@Pause @echo. @echo ... End Script ... @echo. Cheers, CameronUse /K in place of /CThanks for the reply.
Sadly /K made no difference.
Thinking about it a little more, I guess I could invoke NOTEPAD.exe instead. Will have a try doing that.
Many thanks for your effort.
Cheers, CameronTry with this:
start type c:\SOMEFILE.txt
Or if you want see it with the notepad:
notepad c:\SOMEFILE.txtMany thanks for the suggestion Carlos (I saw your post only moments ago).
Have gone with the following and works really well. The script doesn't continue until the notepad applicationis closed, which keeps everything nice and neat. Code: [Select]@echo off
@echo. @echo ... This is a TEST bacth job ... @echo. @echo. @echo. @echo. @echo. Attempting to display another file in another window... @echo.
set SQLContinue= set SQLFile=c:\SOMEFILE.txt
notepad.exe %SQLFile%
@echo. @echo Please confirm... set /p SQLContinue= Do you wish to continue ? [y/N] :
IF /I "%SQLContinue%" NEQ "Y" (
@echo. @echo You have chosen NOT to continue. @echo. @echo Ending Script... @echo.
sleep 5
goto :FinishRun
)
@echo. @echo Continuing after checking %SQLFile%'s logfile.Cheers, Cameron
|