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.
Assigning values to variables (Please help)
Name: Joey Date: August 20, 2000 at 17:05:44 Pacific
Comment:
Hello, I know how to assign values to variables. its... Set variable=10 ... It will give variable a value of 10 but my question is this... Say I have a text file that contains a text "Hello World", how do I get the message "Hello World" to a variable..
Please note that the text file changes it's message, it could be "hello Australia" today and "hello NZ" tomorrow. In other words the solution can't be a hard-code such as variable="hello world" it needs to be something that assigns the value of the text file to a variable
Name: Wally Date: August 20, 2000 at 18:06:47 Pacific
Reply:
I don't know what program you are talking about specifically. Most programming languages have a CONCATENATE command which connects 2 or more text strings.
There is probably a command in whatever language you are talking about, similar to
Set UNKNOWN=Get variable (New Zealand or Minnesota or Bolivia)
Then CONCATENATE "HELLO" & UNKNOWN
0
Response Number 2
Name: Joey Date: August 20, 2000 at 18:43:37 Pacific
Reply:
I'm talking about programming it in DOS... All I want is to be able to catch the contents of a text file and store it on a variable. For example... If I go.. c:\type joey.txt then that text files content is... Hello World (it will show on the command prompt) Hello World Now... How do I store that output to a variable in DOS (using batch files). thanx
0
Response Number 3
Name: Laurence Date: August 20, 2000 at 22:05:10 Pacific
Reply:
There are actually several methods. See #32 "Get input from file into variable" on my tricks page for one such method.
0
Response Number 4
Name: Joey Date: August 21, 2000 at 14:21:39 Pacific
Summary: i dont have op(like win98,95) and i made a new drive call "c" and every time i try to copy files or to view files from this new drive it show me this message"invaild media type reading drive c:" i do...
Summary: Hey guys, im making a report for school, but need having trouble with my end-if block. here is the code, i will then explain what the problem is. do input"enter first number" ",guess1$ num1=val(guess1...
Summary: Hi, I had this problem before until I had my computer repaired by the manufacturer and asked them to fix it.. I recently deleted a 3% partition from my hard drive using Fdisk and created a whole (100%...