Page 1 of 1

Possibly a way to make a batch LAN chat room

Posted: 21 Dec 2013 22:05
by FARAGames
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?

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

Posted: 21 Dec 2013 22:27
by foxidrive
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.

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

Posted: 21 Dec 2013 22:56
by Blyanadams
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.

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

Posted: 22 Dec 2013 08:46
by Squashman
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.

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

Posted: 22 Dec 2013 11:39
by Ed Dyreen
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.

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

Posted: 22 Dec 2013 19:28
by Blyanadams
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

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

Posted: 22 Dec 2013 20:50
by carlos

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

Posted: 22 Dec 2013 21:03
by Blyanadams
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