Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I found the following code. Does any one know if this will run through the
sub folders? I have around 200 folder and need to delete .m4a files. Thanks Sub test() MyPath = "C:\Documents and Settings\My Documents\My Music" Set fs = CreateObject("Scripting.FileSystemObject") LastRow = Range("A1").End(xlDown).Row For r = 2 To LastRow fs.DeleteFile MyPath & Cells(r, "A").Value Cells(r, "A").ClearContents ' Remove file from list after deleting it Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using an Excel sheet for batch delete | Excel Worksheet Functions | |||
batch file call from a macro - how ? and required batch format | Excel Programming | |||
batch delete | Excel Discussion (Misc queries) | |||
Want to run a DOS batch file (.bat) From Excel VBA code | Excel Programming | |||
How to delete in batch the same color format letters in a cell | Excel Worksheet Functions |