| 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! |
Variables in Batch Files
|
Original Message
|
Name: Ford-p
Date: May 19, 2006 at 15:59:23 Pacific
Subject: Variables in Batch FilesOS: Windows XP Pro SP2CPU/Ram: P4 1.6GHz CPU 1GIG RAM |
Comment: Hey, I'm relatively new to batch file programing and I am tearing my hair out over this. I want to be able to set the results of a command as a variable. For example be able to have the results of VER (Microsoft Windows XP [Version 5.1.2600]) as %VER%. The closest I can get is the following: VER > ver.txt FOR /F "TOKENS=*" %%A IN ('TYPE ver.txt') DO ( SET VER=%%A ) Any help for a simpler method would be much appreciated :)
Report Offensive Message 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