Printing DOS screen as it in text file

Lowel To go 98 tungsten light kit - cons...
February 4, 2010 at 02:32:00
Specs: Windows XP, 3.0
Hello Folks,

Anyone know any Batch file command for printing all content of DOS Screen into some text file.

Like as suppose .. my DOS Screen contain following text,

.................. Creating Build for Multiple Modules listed in compile_schema.txt ..................

................. Build started for: LS001/build_m_m_001_01 .................

Buildfile: LS001\build_m_m_001_01.xml
[echo] FLEX_HOME -> :E:\Bertelsmann\newVSS\05 WIP\SCOYO\build\LS001: (remember to call ant -DFLEX_HOME=...)


[xmlvalidate] 1 file(s) have been successfully validated.

[echo] Please make sure to copy all needed assets to the output folder (bin)!
[mkdir] Created dir: E:\Bertelsmann\newVSS\05 WIP\SCOYO\bin\com\tis\LS001\m_m_001_01\assets
[copy] Copying 173 files to E:\Bertelsmann\newVSS\05 WIP\SCOYO\bin\com\tis\LS001\m_m_001_01\assets
[copy] Copied 5 empty directories to 1 empty directory under E:\Bertelsmann\newVSS\05 WIP\SCOYO\bin\com\tis\LS001\m_m_
[copy] Copying 1 file to E:\Bertelsmann\newVSS\05 WIP\SCOYO\bin\com\tis\LS001\m_m_001_01

[mxmlc] Loading configuration file E:\Bertelsmann\newVSS\05 WIP\SCOYO\build\module-config.xml
[mxmlc] Initial setup: 31ms
[mxmlc] Loaded 13 SWCs: 1078ms
[mxmlc] Files: 484 Time: 6938ms
[mxmlc] Linking... 234ms
[mxmlc] Optimizing... 203ms
[mxmlc] SWF Encoding... 235ms
[mxmlc] E:\Bertelsmann\newVSS\05 WIP\SCOYO\bin\com\tis\LS001\m_m_001_01\m_m_001_01_01_co.swf (1169236 bytes)
[mxmlc] Total time: 8734ms
[mxmlc] Peak memory usage: 72 MB (Heap: 42, Non-Heap: 30)
[mxmlc] Loading configuration file E:\Bertelsmann\newVSS\05 WIP\SCOYO\build\module-config.xml
[mxmlc] Initial setup: 187ms
[mxmlc] Loaded 13 SWCs: 657ms
[mxmlc] Files: 485 Time: 5531ms

it should print this complete text at last into some new text file.


See More: Printing DOS screen as it in text file

Report •

February 4, 2010 at 03:11:22
Capturing the contents of the console buffer isn't something that can be done in batch alone, at very least you would need a utility written is some other language.

There are Windows api functions to perform tasks along these lines so it would probably be best to write such a utility in a language that can access the api.

If this is the output of one of your own scripts then the easier solution would be to write a copy to the file at the same time as writing to the screen or set a whole bunch of variables to the output and set up a way to dump those variables to file on command.

My boring little personal page(in progress)

Report •

February 4, 2010 at 13:38:35
this uses debug to write a app that writes the screen to file
"screen.cap". As Judago pointed out, windows doesn't have
a native app to do this. Unfort, i don't think there's a way to direct "LPT1" to a file, then you could use print-screen to capture it.

@goto :100
E100 1E B8 00 B7 8E D8 BE 00 10 89 F7 B9 50 00 AC 2E
E110 AA 46 E2 FA B8 0D 0A AB 81 FE 00 C0 72 ED 1F B8
E120 00 6C BA 12 00 BE 41 01 BB 02 00 31 C9 CD 21 89
E130 C3 B4 40 BA 00 10 B9 B2 0F CD 21 B4 3E CD 21 CD
E140 20 53 43 52 45 45 4E 2E 43 41 50 00 00 00 00 00
if exist goto :110
debug < %0.bat >nul 2>nul
more screen.cap

Report •

February 4, 2010 at 21:56:21
Everythig is Possible is ....what i have Done ....

@echo off

REM Inorder to use build_multi.bat, the compile_schema.txt should be present with the list of modules to be built, in the root
del compile_out.txt
set OUT=compile_out.txt
rem tye nul > %OUT%

set ANT_HOME=E:\Bertelsmann\Build\apache-ant-1.7.0
set JAVA_HOME=C:\Program Files\Java\jre1.6.0
set JAVACMD=%JAVA_HOME%\bin\java.exe

rem setLocal EnableDelayedExpansion

set TASK=buildAll
set OPTS=-Xms512m -Xmx512m -XX:MaxPermSize=256m
echo [TIS] .................. Creating Build for Multiple Modules listed in compile_schema.txt ..................
) >> %OUT%

for /f "tokens=1-9 delims=/_" %%a in (compile_schema.txt) do (
REM echo BUILDFILE %%a/build_%%b_%%c_%%d_%%i.xml
REM echo %!LS!
REM SET MODULE=%%b_%%c_%%d_%%i
REm echo %!MODULE!

echo Creating Build for files in Module %%b_%%c_%%d_%%i to the Server
set TASK=buildAll
set OPTS=-Xms512m -Xmx512m -XX:MaxPermSize=256m

"%JAVACMD%" %OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" %ANT_ARGS% %ANT_CMD_LINE_ARGS% -buildfile "%%a/build_%%b_%%c_%%d_%%i.xml" %TASK%

echo [TIS] ................. Build tried for: %%a/build_%%b_%%c_%%d_%%i.xml .................
echo **************************************************************************************
)>> %OUT%
more %OUT%

Report •
Related Solutions

Ask Question