IF user exist Batch

January 19, 2010 at 03:46:46
Specs: Windows XP
Hi. in my company, I have like 96 computers.another company put their account on some of the computers with the same user name, "Abebe", . please some body help me create a bach file that would only copy a file called "pro.exe" from the same dir that the batch file exist to "C:\" if and only if their user name exist. but if it doesn't exist it should exit. this batch runs in another account in all the computers.
Thank you for your time.
tnxs in advance.

See More: IF user exist Batch

Report •

January 19, 2010 at 06:03:55
Something like this ?

if exist "C:\Documents and Settings\Abebe" copy /Y "C:\Documents and Settings\Abebe\pro.exe" C:\
if not exist "C:\Documents and Settings\Abebe" echo No account ADEBE found on this computer (%COMPUTERNAME%)

Report •

January 29, 2010 at 08:00:07
tnx man, it helped

Report •

Related Solutions

Ask Question