[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Batch script to delete file?

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

656 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