?
Solved

Batch script to delete file?

Posted on 2007-11-14
5
Medium Priority
?
4,792 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 500 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 500 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 500 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 500 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

Automating Terraform w Jenkins & AWS CodeCommit

How to configure Jenkins and CodeCommit to allow users to easily create and destroy infrastructure using Terraform code.

Question has a verified solution.

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

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

771 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