i am writing a script that sets a new computer name. the syntax is:
script.bat /NAME:<place new name here>
the issue is, im not sure how to get my script to verify that the user inputted only letters numbers and hyphens. so, basically, LENOVO-190 is ok, but LENOVO:~19|0) is not. Also, id like it to change all lowercase letters to capitals, just for aestetic affect (i think it looks nicer).
i only want my script to accept A-Z, 0-9, and -. and if an invalid character is inputted (lets say #), it will say something like "hey! # is not allowed!"
thanks everyone, cheers.