Solved

Delete all *.exd files on a PC with VBscript

Posted on 2011-02-17
3
1,603 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
[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
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 article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

735 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