Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch File to Delete specific file for many users...

Status
Not open for further replies.

johng75

IS-IT--Management
Jul 14, 2004
247
US
we have updated our End Point in the company, but it conflics with office 2000 and XP...

there is a DLL error when we open the first email after we open outlook.

we have searched the synamtec site and found a fix, to delete the extend.dat file, and then re-open outlook...

heres the problem...

the file is in the:

C:\Documents and Settings\<account>\Local Settings\Application Data\Microsoft\Outlook

folder, i can create a batch file to go and delete the file, but i would like to deploy it through the GPO to take care of everyone at once, but i dont know how to write it, so it will work on anyones account.

any ideas would be great. im checking VBScripts too, but the only ones im finding suggest i make a txt file and put all the account names in it, but if thats the case i should just make a huge batch file with everyones name... im looking for a better way...






Life is not a journey to the grave with the intention
of arriving safely in a pretty and well preserved body,
but rather to skid in broadside, thoroughly used up,
totally worn out, and loudly proclaiming

--"WOW-- What a Ride!"
 
nmv... i found what i was looking for

for /d %%K in ("C:\Documents and Settings\*") do (
del "%%~fK\Local Settings\Application Data\Microsoft\Outlook\extend.dat"
)
 
You're better off using user environment variables, since the users could have been configured differently.

Code:
@echo off
if exist "%LOCALAPPDATA%\Microsoft\Outlook\extend.dat" (
del "%LOCALAPPDATA%\Microsoft\Outlook\extend.dat"
) ELSE (
echo File not found
pause

PS this is a fairly common occurrence with other AV products as well, so keep it handy for the future
 
thanx for the heads up, luckily through i was the architect that, many moons ago, set up each and every computer....

but ill add that to my list for future usage...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top