How can i get batch to display the first 6 characters of a computername
-
Monday, November 05, 2012 8:02 PM
I found what i thought was a solution and have tried many variation with no luck.
Thanks
If /i "%Compuername:~0,6%" EQU "TECHOP" Set server=East
R White
All Replies
-
Monday, November 05, 2012 8:04 PMModerator
The variable is COMPUTERNAME, not COMPUERNAME.
Bill
- Marked As Answer by tnetplus Monday, November 05, 2012 8:11 PM
-
Monday, November 05, 2012 8:06 PMModerator
Maybe if you spell the variable correctly, it will work. You left out the T ;-))
Tom Lavedas
- Marked As Answer by tnetplus Monday, November 05, 2012 8:11 PM
-
Monday, November 05, 2012 8:12 PM
hmmm
Well i am sure we will be adults about this.
I blame my poor public education.
:(
R White
-
Monday, November 05, 2012 8:27 PMHey, unlike a lot of posters here, at least you pasted an accurate copy of the actual command that was giving you trouble instead of what you thought you had typed! A poor public education, perhaps. But a better forum education...
Al Dunbar -- remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.
-
Monday, November 05, 2012 8:46 PM
LOL
R White

