Introduction: Chat Program

Picture of Chat Program

Please vote for me in the Microsoft Code Contest here:

This is no fake, the CMD program that I will show you how to make is a chat program. You can message your friends or family in school or at home!

Step 1: Open Notepad

First, you need to open "Notepad". Just press the Windows button and search notepad.

Step 2: The Code (1)

Picture of The Code (1)

Now this may seem hard to understand or difficult to comprehend, but it's not. If you don't want to type all of this, just copy paste. There are two programs that need to be in the same folder that we will make. This is the first.

Warning: This is the messenger part of the programs.

@echo off
color 0b

title Chat Messenger

echo Hi, welcome to the chat program!


set /p username=Enter Your Name:

echo %username% has joined! >> join.dat


set /p message=Say:

goto send


echo %username%: %message% (%time%)>> log.dat

goto message

Now, copy this into notepad and save it in folder. Name the file as messenger.bat

Step 3: The Code (2)

Picture of The Code (2)

This is the receiver part of the code, save this as receiver.bat in the same folder.

Warning: This is the receiver part!!!

@echo off
color 0b



type join.dat


type log.dat


timeout /t 2

goto read

Save in the same folder as the other program.

Step 4: Try Them Out!!! :)

Now just open both programs, type in your name, and say something. Boom! You just made a chat program. Now all you have to do to chat with others is share the folder with them!


Nate Oaks (author)2015-02-28

Sice some of you are having trouble with this, you can download it from this link:

Nate Oaks (author)Nate Oaks2015-02-28

By the way, these are 2 different links. Just open both and have fun!


ishu1000 (author)2015-03-29

Which language have you used in this program. please tell .

BenjaminF54 (author)ishu10002016-08-24

He used note pad in a .bat save

Givo_29 (author)2015-10-27

i made this but i found having to have 2 different tabs opened a little annoying so i put it all together:

@echo off

color 0b

title Chat Messenger v1

echo Hi, welcome to the chat program!


set /p username=Enter Your Name:

echo %username% has joined! >> join.dat

set /p message=Say:

echo %username% -(%time%): %message% >> log.dat

type join.dat


type log.dat

goto message



type join.dat



type log.dat

set /p message=Say:

echo %username% -(%time%): %message% >> log.dat


type log.dat

goto message

Hope it helps for those who found it annoying too.

4418biki (author)2015-08-26

how can i run this programe ,??

Nate Oaks (author)4418biki2015-08-27

You can download the program's form my links and just click them twice.

Anbu8366 (author)2015-07-24

awesome I'm gonna try this

MrCombobulouse (author)2015-05-21

Do i need to make the reciever file public?

EvolvedAwesome (author)2015-04-15

This is some excellant use of CMD

MrCombobulouse (author)2015-04-06

How does it send the message to another computer?

It is a great program. I have not tried it, but i have added some user features, such as username and password protected profiles, admin control, and made the chatting a bit nicer.


Nate Oaks (author)MrCombobulouse2015-04-06

I'm glad that you had some fun with this program, how it works is the messenger makes a file that stores information that has been typed, and the receiver just types it onto the screen.

MrCombobulouse (author)Nate Oaks2015-04-06

Trust me, I all ready have!

MrCombobulouse (author)Nate Oaks2015-04-06

Cool! Do you want to see the modified code at a later date?

Nate Oaks (author)MrCombobulouse2015-04-06

Sure! Just email them to me at

Be sure to vote for me in the coded creations contest, look for "Chat Program"

ishu1000 (author)2015-03-29

I have done it but it is showing
" 'timeout' is not recognised as an internal or extenal command, operator program or batch file. what should i do. help me

Nate Oaks (author)ishu10002015-03-30

This is a batch file program. Instead of copying and pasting try the download links. This should fix the problem.

ishu1000 (author)2015-03-24

how can i talk to my friends. does it requires Internet connection. please reply on = this is my email. please help fast.

Nate Oaks (author)ishu10002015-03-26

They have to be in your network. Yes it does require Internet.
Sorry I didn't email you, this is just a common question which gets asked by email too many times. To share it you right click press share them specify who you are sharing it with.

ishu1000 (author)2015-03-24

How would i run it

TheSherlockedTardis (author)2015-03-24

It is great fun, thanks. For those of you who have copied and pasted into notepad, and once you enter your name can't type anything, and the receiver just logs the time endlessly, then look no further for the solution. On the messager file, on the 8th line of coding, where it says ':message set/p', just click before the 's' (in set/p) and press 'enter'. (Don't click after 'e' in message, we don't want the space). Then you are done. If you find you don't want the hyper accurate time, then just delete the (%time%) section, just make sure the >> are the same distance away from the (%message%). Finally, if you don't like blue and prefer classic old school green, then where it says colour at the start, replace the 'b' with a '2', so it says '02'. Hope this helps, and thanks for a great 'ible!
P.S. How do you actually add other people?

To add other people, you right click the folder and press share. After that,specify who you're sharing it with on your network, finally click done.

edrisamiry (author)2015-03-20

does it need an Internet connection to send/receive? replay here..... I m waiting for your answer

mdtanvira3 (author)2015-03-16

You need to upload more screenshot for a proper post.

Off topic " For games and software visit here "

sarthak1234567890 (author)2015-03-15

how will you add others on it

BrockL (author)2015-03-07

How do you share it with other people on a network? And is this network a internet network?

Nate Oaks (author)BrockL2015-03-07

It is an Internet connection, and you share it by right clicking it, go to share, then enter the information of the person you are sharing it with.

BrockL (author)Nate Oaks2015-03-09


lukemc90 (author)2015-03-06

Really cool program.

vektor (author)2015-03-03

Code didn't work from copy/pasting from your 'ible. Some spelling mistakes do exist, so that's probably the problem.

Only got it working when downloaded via the links provided below.

mawloch (author)2015-03-01

Awesome! Thankyou.

bravoechonovember1 (author)2015-03-01


thimoschiltmans (author)2015-03-01

i don't know how this works. can anyone help me?!

These programs work together by when you type a message, it creates a file. The the receiver refreshes every 2 seconds and when it does, it takes whatever was placed in the new file and puts it on the screen. It's sort of copy paste.

redmarkonthewall (author)2015-03-01

I removed the time stamp like you said and I got it working on one computer currently

Great. I hope you like it.

roanbuma (author)2015-03-01

Color isnt nessecary, but go for color 02 for the famous "hacker" colors

horsebones (author)2015-03-01

it's great to see more code here on instructables.

xKOBAYASHIMARUx (author)2015-03-01

Now I am by no means an expert in .bat programming so correct me if I'm wrong but can't you write a couple lines of code that makes the messenger program automatically open the receiver program (or vice versa)? I really like this 'ible by the way! Reminds me of Ender's Game. lol

That is actually a great idea, I will try to add that in and make a link to it for downloads.

script_coded (author)2015-03-01

Lol :)
Made a program very similar to this one. Though, used a dropox utility for batch to make it more user friendly.
Great i'ble!

dondzino1215 (author)2015-02-28

Can u use it over a network or have to be on same computer

Nate Oaks (author)dondzino12152015-02-28

You can use it over the network as long as you share the folder with whoever is using it. When you share the folder, you are both able to access the files it creates.

hp62a (author)2015-02-28

My messenger wont allow me to type once I enter a name, and my receiver says "The system cannot find the file specified" at the top under "username has joined!".

Nate Oaks (author)hp62a2015-02-28

You probably weren't actually in the program when you tried typing, it was most likely running in the background, and the receiver part says it can't find the file until you say something in the messenger.

Skwurlito (author)2015-02-28

I made a program that talks to you with a raspi programmed in python. I got into an argument with it. raspberry pi for dummies has the guide.

Kafukai (author)2015-02-28

Sweet! I'll try this at work, we have an interior network, but we have a shared folder with every computer.

redmarkonthewall (author)2015-02-28

I tried it but something isn't working.. The messenger part seems to be ok but the receiver doesn't seem to work proper... It's keeps running some time stamps and the says wait 1 or 2 seconds then press any key and then is repeats a while bunch more lines of time stamps

As for the time stamps, if you do not like them, just delete it by right clicking the messenger program and it should open notepad. Now just find where it says "%time%" and delete that function. Tell me if it works, otherwise I could just send the program without time stamps to an email. Make sure you save the changed document before you close it !!!

The program waits 2 seconds before refreshing in order for it not to lag, and it will not fully work until you say something in the messenger. Please comment back if you have any more problems.

About This Instructable




More by Nate Oaks:Chat ProgramMini HeaterChat Program
Add instructable to: