1.

Solve : How do i copy the results of a program run in ms-dos to a txt-file??

Answer»

I have to RUN a program in MS-DOS and I want the results of that program to be automatically written to a txt-file. Is this possible?

another question:

Is it possible to have a loop running for a number of times (and quit after 30 times)? and that each time the result WOULD be written to an text file without overwriting the last files?

Please some advice!



Yes appending to a text file can be done buy using > to START a file and >> to echo into the file

to loop a specified amount of times, set a variable as zero then have the loop ADD to it by 1 everytime it loops example:

set var=0
:loop
set /a var=%var%+1
cls & echo %var%
if "%var%"=="30" Goto End
Pause>nul
Goto loop
:End
Cls&echo end
Thank you very much,

my problem is solved!

greetings



Discussion

No Comment Found