Possibly a way to make a batch LAN chat room

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
FARAGames
Posts: 11
Joined: 04 Aug 2013 22:03

Possibly a way to make a batch LAN chat room

#1 Post by FARAGames » 21 Dec 2013 22:05

I thought up of an idea for a batch LAN Chat room, I am using this to create Textcraft 9.0 LAN servers. Now, this is how it works (maybe). So you have 2 PCs which both are connected to the same network. Then you have a batch file on both computers that reads the file "c.txt" in the folder "C:/Users/Public" is it possible to pass variables through the "c.txt" file when it is in the public folder?

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Possibly a way to make a batch LAN chat room

#2 Post by foxidrive » 21 Dec 2013 22:27

FARAGames wrote:Then you have a batch file on both computers that reads the file "c.txt" in the folder "C:/Users/Public" is it possible to pass variables through the "c.txt" file when it is in the public folder?


What do you mean? Give examples.

Blyanadams
Posts: 23
Joined: 20 Dec 2013 05:41

Re: Possibly a way to make a batch LAN chat room

#3 Post by Blyanadams » 21 Dec 2013 22:56

FARAGames wrote:I thought up of an idea for a batch LAN Chat room, I am using this to create Textcraft 9.0 LAN servers. Now, this is how it works (maybe). So you have 2 PCs which both are connected to the same network. Then you have a batch file on both computers that reads the file "c.txt" in the folder "C:/Users/Public" is it possible to pass variables through the "c.txt" file when it is in the public folder?


if you just want to connect to LAN without going out into the internet, there are some ways to do this.
1) FTP. well, ftp to a ftp server where the c.txt is stored, get the file , decode what's in there and do the necessary. but this is a more tedious task

2) use Windows File sharing like what you mention. You share a network drive where you can store the c.txt file and everybody goes there to read this file and passing variables to this file is just like normal batch file coding.

3) Use messaging service. eg Messenger. The use commands like "net send" to do the connections.

although i would suggest if you are serious about LAN prgramming, to use a programing package that comes with socket programming , or networking libraries. eg .NET , Java , Perl, and others. This is because very often, for such a project, you will need some sort of file locking , concurrencies etc which will not be supported by pure batch coding.

Squashman
Expert
Posts: 4484
Joined: 23 Dec 2011 13:59

Re: Possibly a way to make a batch LAN chat room

#4 Post by Squashman » 22 Dec 2013 08:46

If you Google search Batch Lan Chat you will see you are not the first person to do this. I am pretty sure this subject has been talked about on the forums in the past as well.

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: Possibly a way to make a batch LAN chat room

#5 Post by Ed Dyreen » 22 Dec 2013 11:39

Blyanadams wrote:you will need some sort of file locking , concurrencies etc which will not be supported by pure batch coding.
some sort of file locking , concurrencies etc are supported by pure batch coding.

Blyanadams
Posts: 23
Joined: 20 Dec 2013 05:41

Re: Possibly a way to make a batch LAN chat room

#6 Post by Blyanadams » 22 Dec 2013 19:28

Ed Dyreen wrote:
Blyanadams wrote:you will need some sort of file locking , concurrencies etc which will not be supported by pure batch coding.
some sort of file locking , concurrencies etc are supported by pure batch coding.

seriously? lol

carlos
Expert
Posts: 503
Joined: 20 Aug 2010 13:57
Location: Chile
Contact:

Re: Possibly a way to make a batch LAN chat room

#7 Post by carlos » 22 Dec 2013 20:50


Blyanadams
Posts: 23
Joined: 20 Dec 2013 05:41

Re: Possibly a way to make a batch LAN chat room

#8 Post by Blyanadams » 22 Dec 2013 21:03

net send

Code: Select all

C:\Documents and Settings\administrator>net  send /?
The syntax of this command is:


NET SEND
{name | * | /DOMAIN[:name] | /USERS} message




Winchat.exe

Code: Select all

C:\Documents and Settings\administrator>winchat


although its window based

Post Reply