Computing.Net > Forums > Disk Operating System > Make a batch file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Make a batch file

Reply to Message Icon

Name: Bernardus88
Date: November 30, 2003 at 07:02:28 Pacific
OS: WinXp Pro
CPU/Ram: 3000/1000
Comment:

Hi all,

Could someone please make a batch file which sends a message to a pc in my network using the "net send" command ?

it should ask to what pc (1 2 or 3)
and what the message is.

some thing like:
net send /domain:pc-1 testing

where "pc-1" was input 1 and "testing" input 2

"net send: runs from the command prompt.

if someone could ??
may thanks

Bernard




Sponsored Link
Ads by Google

Response Number 1
Name: jdog1001
Date: December 29, 2003 at 14:06:29 Pacific
Reply:

Hey Bernard,

Here:

@ECHO OFF

cls

CHOICE/C:123 What Computer do you want to send %1 to?

IF ERRORLEVEL 3 GOTO comp3
IF ERRORLEVEL 2 GOTO comp2
IF ERRORLEVEL 1 GOTO comp1

cls

:comp1
copy %1 C:\windows\desktop\comp1\%1
GOTO end1

:comp2
copy %1 C:\windows\desktop\comp2\%1
GOTO end2

:comp3
copy %1 C:\windows\desktop\comp3\%1
GOTO end3

cls

:end1
ECHO You have successfully sent %1 to Computer #1
GOTO final_end

:end2
ECHO You have successfully sent %1 to Computer #2
GOTO final_end

:end3
ECHO You have successfully sent %1 to computer #3
GOTO final_end

:final_end
pause


Well that is the Whole program, to send the file go to DOS and go to the folder the .bat is located and start it by doing something like this(suppose we name it send.bat):

send C:\windows\Desktop\test.txt

then this would pop up with the program asking you which computer you would like to send the test.txt file to. I dont know exactly where you want them sent and all that so just E-mail me if you need help editing this.

NOTE: Where ever you are sending it the folder you are using the copy command to copy the file there the directory must be made I am not sure why I tried to get it to make a folder and then copy it if there was no folder there but didn't have the time.

-Jason



0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Make a batch file

How do u make a batch file that runs whenever the computer boots up www.computing.net/answers/dos/how-do-u-make-a-batch-file-that-runs-whenever-the-computer-boots-up/3744.html

Set wallpaper using a batch file www.computing.net/answers/dos/set-wallpaper-using-a-batch-file/5906.html

create a batch file? www.computing.net/answers/dos/create-a-batch-file/13073.html