Was hoping someone could tell me how to do the following :-
FOR /F “tokens=1* delims=: ” %%A IN (‘SRVINFO -ns %1 ^| FIND “Domain:”‘) DO SET domain=%%B
The output of the above is domain.ad.co.uk
is there anyway in the batch file to make the variable ignore everything after the . so that any time a domain is found, it is only the first section that is delivered to the variable
E.G doma.ad.co.uk becomes doma
domb just remains domb
dombc.co.uk becomes dombc
Thanks in advance