Search found 5 matches

by ulricken
05 Aug 2017 14:51
Forum: DOS Batch Forum
Topic: Question on adding Input to line of pre-built text
Replies: 8
Views: 4746

Re: Question on adding Input to line of pre-built text

Thank you all for the information.

I know this is a rookie question/script, but we all got to start somewhere.

I will be doing some research on the setlocal EnableDelayedExpansion.

As for now, I feel like this question is answered.
by ulricken
05 Aug 2017 14:50
Forum: DOS Batch Forum
Topic: Question on adding Input to line of pre-built text
Replies: 8
Views: 4746

Re: Question on adding Input to line of pre-built text

Two things are missing. 1) If you want to output something use the ECHO command. 2) If you want to expand variables enclosed in exclamation marks you need to enable delayed variable expansion. @echo off SET /P UserInput=Please type the Number: setlocal EnableDelayedExpansion echo You owe us an amou...
by ulricken
05 Aug 2017 14:48
Forum: DOS Batch Forum
Topic: Question on adding Input to line of pre-built text
Replies: 8
Views: 4746

Re: Question on adding Input to line of pre-built text

Also, you're using !UserInput! instead of %UserInput% but I'm not seeing a setlocal enabledelayedexpansion anywhere. I just found out about the %UserInput% prior to seeing this.. I guess I was wording it weirdly with Google on trying to find the answer. Honestly I'm not sure what the setlocal enabl...
by ulricken
05 Aug 2017 14:46
Forum: DOS Batch Forum
Topic: Question on adding Input to line of pre-built text
Replies: 8
Views: 4746

Re: Question on adding Input to line of pre-built text

Is that your entire script? Are you running it from the command prompt or double clicking it? Exactly what are you entering as input? Yes, it is. I know a beginner lol. I actually figured out that I should have been using %UserInput% instead of !UserInput!. It was a numeric value as Input(i.e. 36, ...
by ulricken
05 Aug 2017 13:16
Forum: DOS Batch Forum
Topic: Question on adding Input to line of pre-built text
Replies: 8
Views: 4746

Question on adding Input to line of pre-built text

Hello All, OS: Windows 7 Ultimate 64-bit I am trying to create a batch file that will do the following. @echo off SET /P UserInput=Please type the Number: You owe us an amount of !UserInput! pause But I get the following as the result Please type the Number:12 "You owe us an amount of 34.!UserI...