×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Batch Programming in Windows 2000

Batch Programming in Windows 2000

Batch Programming in Windows 2000

(OP)
I don't know exactly where to go; so I'm simply posting this here.

I would like to recieve input from con and place the value into the %USER_1% variable

Something like "copy con %USER_1%" but not. That sends it to wherever user_1 points. I want basically "set CON=%USER_1%"; CON being input from the console. If anyone can give me a hand it would be greatly appreciated.

thx
-- ian

RE: Batch Programming in Windows 2000

Forgive me if this seems a bit messy.  I might be doing this the hard way (I have a habit of this)

If I understand correctly, you want to do a copy con, have the user input something, hit CTRL+Z and Enter, and then have the user's input turned into a variable.

Here is how I do it.

copy con c:\test\test.txt
For /F %%I in (c:\test\test.txt) do echo set test=%%I > tempbat.bat
call tempbat.bat
del tempbat.bat
echo %test%


That does work with 2k, BTW.  For future reference, I don't know if many batch file questions get answered here, but I do know that people post them in 2k pro and win nt forums.

Merry Christmas
Mudskipper
     ___________________________________________________________________________________

Groucho said it best-  "A four year-old child could understand this! Quick! Run out and find me a four year-old child: I can't make heads nor tails out of this!"

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close