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.
snyderkvAsked:
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
outlook.exe
^z

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

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

M.
0
 
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.
0
 
pavaneeshkumarConnect With a Mentor Commented:
set NK2PATH=%APPDATA%\Microsoft\Outlook\Outlook.NK2
if exist %NK2PATH% del %NK2PATH%
0
 
snyderkvAuthor Commented:
Cool it worked. Thanks guys.

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

From novice to tech pro — start learning today.