Solved

Batch script to delete file?

Posted on 2007-11-14
5
4,755 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
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

759 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now