| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
Variable from a file?
|
Original Message
|
Name: Mathieu Gendreau
Date: July 31, 2005 at 18:46:22 Pacific
Subject: Variable from a file?OS: Windows 98SECPU/Ram: not needed |
Comment: Hello everybody, Let me explain my question, I have 2 batch file, the first one create a file with a value in it and the second need to set a variable using the value given in the file. set variable=<myvariable.txt didn't work. Sincerly yours, Mathieu Gendreau
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: Mechanix2Go
Date: August 1, 2005 at 03:53:02 Pacific
|
Reply: (edit)Hi, "set variable=<myvariable.txt didn't work" You're right; that won't work. Neither will this: set /p variable=<myvariable.txt Try this: ::== my.bat @echo off echo set myvar=mystring > setMYvar.bat setMYvar ::== M2 If at first you don't succeed, you're about average.
Report Offensive Follow Up For Removal
|

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