1.

Solve : Welcome banner?

Answer»

Let's say I have a .TXT file, with 20 welcome messages, and when I start my computer, i want that a .BAT file , can take a message from that TXT file (let's say i want that .BAT file take that message from the .TXT after 1 minut) , and put it in a CMD, give an "Enter" , and after that the CMD will close it himself .
Can anybody help me pls ?

I hope that I explain well.
Thanks all !!!I think I understand what you mean.

As FAR as I'm aware you can only take the top line of a txt file in to a BATCH file as a varible, so can be used elsewhere.

Can you give an example of what the txt file will hold??i think also at this, and i do not know if he can take me from the TXT file for example...
Heloo User
but i think he can take me if i use
Hello_User

It`s OK also if the .BAT file can take only the first line, i will make let`s say, 20 .TXT file and the .BAT file chose one from this 20 .TXT files.
1.txt Hello And Have A Nice Day
2.txt What A Beautiful Day Is Today

Like a /usr/games/fortune in Linux

If I understand RIGHT, you want a batch file that can print out a random line from a file? If so, you should be able to create a file called "banner.txt" with your 20 lines, and use the FOLLOWING code:
Code: [Select]@echo off
setlocal
set file=banner.txt
for /f %%a in ('find /v /c "" ^< %file%') do set lines=%%a
set /a line=%random%%%lines
for /f "skip=%line% delims=" %%a in (%file%) do echo %%a&exit /bi also have a problem like this:
i make a little .EXE that can do DNS and WHOIS in cmd
C:\wd&GT;wd.exe
Ip Here (eg. 127.0.0.1 ) : ...............
The problem is, that when I run wd.exe, my .EXE program, need that an IP adress be there.
Where is ................. MUST BE AN IP ADRESS
Can a bat do this for me ? can take a line from a .TXT file ?
Can somebody help me pls ?
Have A Nice Code All lecce, you should start your own thread for this, and not ask your question at the end of somebody elses.
Quote from: lecce on February 27, 2008, 02:58:16 AM

i also have a problem like this:
i make a little .EXE that can do DNS and WHOIS in cmd
C:\wd>wd.exe
Ip Here (eg. 127.0.0.1 ) : ...............
The problem is, that when I run wd.exe, my .EXE program, need that an IP adress be there.
Where is ................. MUST BE AN IP ADRESS
Can a bat do this for me ? can take a line from a .TXT file ?
Can somebody help me pls ?
Have A Nice Code All

*censored* Hijacker.......


Discussion

No Comment Found