Solved

Delete all *.exd files on a PC with VBscript

Posted on 2011-02-17
3
1,587 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 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