Solved

Batch script to delete file?

Posted on 2007-11-14
5
4,771 Views
Last Modified: 2008-02-01
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.
0
Comment
Question by:snyderkv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 23

Accepted Solution

by:
Ashish Patel earned 125 total points
ID: 20278332
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
 
LVL 6

Assisted Solution

by:MorDrakka
MorDrakka earned 125 total points
ID: 20278357
Hi,

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

M.
0
 
LVL 3

Assisted Solution

by:fseto
fseto earned 125 total points
ID: 20278375
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
 
LVL 5

Assisted Solution

by:pavaneeshkumar
pavaneeshkumar earned 125 total points
ID: 20278586
set NK2PATH=%APPDATA%\Microsoft\Outlook\Outlook.NK2
if exist %NK2PATH% del %NK2PATH%
0
 

Author Comment

by:snyderkv
ID: 20303276
Cool it worked. Thanks guys.

Does anybody know of any batch file scripting books?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ROBOFTP UNZIP 1 59
Review of the nodejs code 1 37
Need help Creating a Powershell script 8 61
[switch] $NoInheritance - Powershell Code 5 20
This article will show, step by step, how to integrate R code into a R Sweave document
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question