Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stripping out part of %computername%

Status
Not open for further replies.

strangetimes

Technical User
Apr 13, 2002
32
0
0
GB
How would I word a script to strip the first three characters from a %computername% variable to run a batchfile on w2k.

I think I may have part of it eg.

SET newvariable=%COMPUTERNAME:~0,3%
IF %newvariable%==ABC (need help here) \\server\new.bat



Strangetimes
CCNA MCP CCAI NET+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top