Batch script to delete file?

How would I create a batch script to delete the Outlook.NK2 file for Microsoft Outlook?

The path is:

C:\Documents and Settings\MYNAME\Application Data\Microsoft\Outlook/Outlook.NK2

It would be awsome if I can send this to users to double click and delete  there autocomplete cache.
Who is Participating?
Ashish PatelConnect With a Mentor Commented:
create a batch file to and place all the commands like this.
Copy Con OutlookDelete.bat
tskill outlook.exe
del C:\Documents and Settings\MYNAME\Application Data\Microsoft\Outlook/Outlook.NK2

Your OutlookDelete.bat should then be ran for getting your purpose done.
MorDrakkaConnect With a Mentor Commented:

Replace MYNAME with %USERNAME% and you are good to go.

fsetoConnect With a Mentor Commented:
err....I presume that "MYNAME" should be each user's name??  If so, change the following line:

del %APPDATA%\Microsoft\Outlook\Outlook.NK2

Don't take my word for it!  Replace "del" with "echo" first and convince yourself that it's working right before changing to del.
pavaneeshkumarConnect With a Mentor Commented:
set NK2PATH=%APPDATA%\Microsoft\Outlook\Outlook.NK2
if exist %NK2PATH% del %NK2PATH%
snyderkvAuthor Commented:
Cool it worked. Thanks guys.

Does anybody know of any batch file scripting books?
All Courses

From novice to tech pro — start learning today.