Solved

Delete all *.exd files on a PC with VBscript

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

760 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

23 Experts available now in Live!

Get 1:1 Help Now