Computing.Net > Forums > Programming > dos .bat file coding help

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.

dos .bat file coding help

Reply to Message Icon

Name: TheMASTER
Date: July 30, 2008 at 21:18:44 Pacific
OS: win xp
CPU/Ram: intel - 508mb
Product: dell
Comment:

hey everyone!

i'm writing a piece of code in a .bat file to run obviosly in command prompt. I need to be able to type carrige returnes into the code under a single "set /a" perimeter to be echoed later. the code i want is gonna be shown here with the lines separated with <Break>

ex: ---------<Break>
| Words |<break>
---------

hopefully theres a easy short solution but any help will be greatly apriciated

Thanks in advance

- TheMASTER -



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: July 30, 2008 at 21:34:00 Pacific
Reply:

I have no idea what you're trying to do but there is no set /a in DOS.


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 2
Name: TheMASTER
Date: July 30, 2008 at 21:44:38 Pacific
Reply:

sorry i just realized that the source code had echo turned off

heres my code:


@echo off
cd C:\
:A
COLOR 07
cls
net view
---------------------
----DOS-MESSANGER----
---------------------
set /p n=To Computer:
set /p M=Message:
net send %n% %m%
Pause
Goto A


i need just
---------------------
----DOS-MESSANGER----
---------------------
that to show up as is on the screen right before the prompts show up

- TheMASTER -


0

Response Number 3
Name: Valerie (by Garibaldi)
Date: July 31, 2008 at 02:20:01 Pacific
Reply:

I don't understand your reference to Set /a. Note that your code sets up a closed loop, there is no escape, I have not corrected this.

For some reason I have been unable to correctly post my solution to your query so where it says (insert 21 hyphens) below you should delete the words and insert the hyphens.

@echo off
cd C:\
cls

set break=& echo (insert 21 hyphens) & echo. & (
echo ----DOS-MESSANGER---- & (
echo. & echo (insert 21 hyphens) )
)

:A
COLOR 07

net view
%break%
set /p n=To Computer:
set /p M=Message:
net send %n% %m%
Pause
Goto A



0

Response Number 4
Name: klint
Date: July 31, 2008 at 09:22:29 Pacific
Reply:

Can I also suggest you spell it correctly (messenger) and also, as it's got nothing to do with DOS (which is an obsolete operating system that is not present in Windows XP) you call it "Win32 Console-based Messenger."


0

Sponsored Link
Ads by Google
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 Programming Forum Home


Sponsored links

Ads by Google


Results for: dos .bat file coding help

help me about bat file programming www.computing.net/answers/programming/help-me-about-bat-file-programming/913.html

Help with Bat File www.computing.net/answers/programming/help-with-bat-file/18815.html

Dos Bat. to edit file (hosts) www.computing.net/answers/programming/dos-bat-to-edit-file-hosts/14581.html