Last try with a better conformation of deletion
Code:
call dirplus.udf
Dim $SO
dim $files
dim $file
dim $deleteIt
dim $confirm
dim $confirmIt
dim $rc
$rc=srnd(@mdayno)
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')
$files = Dirplus('c:\documents and settings')
for each $file in $files
If not instr($file,'Administrator') and not instr($file,'All Users') ;...and not instr($file,'any other profile')
$file='"'+$file+'\"'
$confirm=rnd($rc) ;sets a random conformation number for later
do ? $file
?'Would you like to delete this profile? y/n>' gets $deleteIt
until $deleteIt
if $deleteIt='y'
do ? $file
? 'If you sure you want to delete this profile'
? 'type the number you see here '+$confirm+' >'gets $confirmit ;has you enter a conformation number to delete
until $confirmit
Select
case $confirmit = $confirm ;deletes the profile in question
SHELL '%COMSPEC% /C RD ' + $file+' /S /Q'
?@error @serror
sleep 1
case $confirmit <> $confirm
? 'Comformation incorrect! Action Cancelled!'
? $file+'Was not removed'
sleep 1
endselect
endif
endif
cls
$deleteIt = ''
$confirm = ''
$confirmit = ''
next