Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting past the net send limitations

Status
Not open for further replies.

JohnVogel

Programmer
Apr 19, 1999
117
US
I would like to be able to send a message to all users on the network, however whenever I send a message using
C:> Net Send * blahblah

The message gets truncated if it is over (i think) 128 Characters long. Is there anyway of getting past this limitation to send a longer message to all network users?

John Vogel
jvogel2000@hotmail.com
 
Yes and no.
;)

You CAN send the contents of a text file to all network users, but the caveat is that it will not work with broadcasting. You'd have to list all the users you want to send to individually. (I know..it's pointless)

I've successfully sent a test file containing 750 characters individually (and im sure it'll send more than that), but the message truncates at 255 for broadcasting, and I've heard no way around that limit.
In order to send the text file, a batch file has to be used instead of the Net Send command as well, so as you can see - it IS possible, but not very practical to do.

Hope that helps..if you need the batch file, I can email it to you that will allow you to send the contents of a text file to individual users with a much greater character-limit than the net send command.
Pbxman
Systems Administrator

Please let Tek-Tips members know their posts were helpful.
 
Thanks, I would be very grateful if you could either send me the batch file by email (jvogel@hotmail.com) or post it here.

John Vogel
jvogel2000@hotmail.com
 
Well - it wont let me send to your hotmail account...says it's inactive.

So - here's the contents of it:

@echo off
setlocal
if {%2}=={} (echo usage: sndfle msgfile user-list) & (goto end)
if not exist %1 (echo usage: sndfle msgfile user-list) & (goto end)
for /f "Tokens=*" %%i in ('type %1') do call :setmsg ##"%%i"##
set msg=%msg:##"=%
set msg=%msg:"##=%
:LOOP
if {%2}=={} endlocal&goto end
net send %2 %msg%
shift /2
goto :LOOP
:setmsg
if not defined msg set msg=%1&goto end
set msg=%msg% %1
:end



The useage is:
C:\>sendfil filename.txt username
or
C:\>sendfil filename.txt username1,username2,username3, etc..

Hope this helps you out..
Pbxman
Systems Administrator

Please let Tek-Tips members know their posts were helpful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top