Hopefully a fairly simple one this.
I am using a script to automate disabling old unused accounts.
@echo off
if {%1}=={} @echo Syntax: disableDNs FileName&goto :EOF
if not exist %1 @echo Syntax: disableDNs %1 not found.&goto :EOF
setlocal ENABLEDELAYEDEXPANSION
set file=%1
@echo.
for /f "Tokens=*" %%u in ('type %file%') do (
set user=%%u
rem set user="!user:"=!"
@echo DSMOD USER !user! -desc Disabled -disabled yes
DSMOD USER !user! -desc Disabled -disabled yes
@echo.
)
endlocal
What I would like to do is have the -desc Disabled append the date the
script is run. That way I can see how long the account has been disabled. So
obviously I need a mm/yy format.
What is the correct syntax? Should I be using quote marks?
--
Pete Jones
|