Solved

Delete all *.exd files on a PC with VBscript

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

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;…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

831 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