Re: username
- From: "Al Dunbar" <AlanNOSPAmDrub@xxxxxxxxxxx>
- Date: Thu, 22 Sep 2005 19:42:37 -0700
"Rod Harrison" <rharrison@xxxxxxxxx> wrote in message
news:%23WiGRy6vFHA.3556@xxxxxxxxxxxxxxxxxxxxxxx
> Be careful, my previous post word wrapped. I am resending this to notate
> where each line starts
>
> ********************************************
> Line 1- @echo off
> Line 2- for /f "Tokens=1-4" %%a in ('net user "%username%" /domain') do if
> /i "%%a"=="Full" if /i "%%b"=="Name" set fnme=%%c
> Line 3- for /f "Tokens=1-4" %%a in ('net user "%username%" /domain') do if
> /i "%%a"=="Full" if /i "%%b"=="Name" if /i "%%c"=="%fnme%" set lnme=%%d
> Line 4- echo %fnme% %lnme%
> ********************************************
Another common (and simpler) way to annotate linewrap is to prefix each line
with whitespace, i.e.:
********************************************
@echo off
for /f "Tokens=1-4" %%a in ('net user "%username%" /domain') do if /i
"%%a"=="Full" if /i "%%b"=="Name" set fnme=%%c
for /f "Tokens=1-4" %%a in ('net user "%username%" /domain') do if /i
"%%a"=="Full" if /i "%%b"=="Name" if /i "%%c"=="%fnme%" set lnme=%%d
echo %fnme% %lnme%
********************************************
/Al
> I basically figure out the first name and last name from AD and place
> those
> results into variables %fnme% and %lnme%
> You could use these variables to do what you are requesting.
>
>
>
.
- References:
- Re: username
- From: Rod Harrison
- Re: username
- From: Rod Harrison
- Re: username
- Prev by Date: Re: username
- Next by Date: task scheduler and bach files running
- Previous by thread: Re: username
- Next by thread: task scheduler and bach files running
- Index(es):
Relevant Pages
|