IT Employment

General discussion


Batch File Still

By mbyrne3375 ·
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

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 becomes doma
domb just remains domb becomes dombc

Thanks in advance

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Related Discussions

Related Forums