Solved

Delete all *.exd files on a PC with VBscript

Posted on 2011-02-17
3
1,557 Views
Last Modified: 2012-05-11
Hi Everyone,

I was wondering if there is a reasonable way to loop through a users entire C:\Documents and Settings folder to delete every "*.exd" file with a VBscript? If this is not a good way to do things, other suggestions would be OK, but not preferred. We could also remove manually through a Windows search, but this requires visiting every user individually.

A sample of the problem is listed here, but I am rather unfamiliar with C language and there are some differences. We also have an Excel add-in which generates *.exd files but are stored in a different location within the "Documents and Settings" folder.

We have encountered this problem after migrating from Office 2003 to 2010 - while staying with Windows XP.

Any help is greatly appreciated - as this is kind of urgent! Thanks!

-Drew
0
Comment
Question by:DrewBowen
3 Comments
 
LVL 6

Accepted Solution

by:
Bxoz earned 250 total points
ID: 34919474
Hi,

in a .bat file put del *.exe
0
 
LVL 8

Assisted Solution

by:ragnarok89
ragnarok89 earned 250 total points
ID: 34919482
For Each filePath As String In IO.Directory.GetFiles("C:\Documents and Settings\", "*.exd", IO.SearchOption.AllDirectories)
IO.File.Delete(filePath)
Next filePath

Should do it.
0
 

Author Comment

by:DrewBowen
ID: 34919878
Thanks to both of you, that helps a lot. A can't believe I didn't think of a batch file though. :(

Here's what was used: DEL /S C:\*.exd*

Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

920 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

15 Experts available now in Live!

Get 1:1 Help Now