delete files

  1. P

    VBA Upper and Lower case

    Hey friends, I need help in order to write a VBA code much shorter and in a smart way. I want to delete files located at specific folder, all the files except of pdf files. The problem is that there are 8 extensions variations for the name "pdf" files pdf, Pdf, PDf, pDF,pdF,PDF,pDf,PdF In...
  2. B

    if file name in column C is red the delete that file from folder

    I am trying to delete old files from a folder. file names are in column C and old files are colored RGB(255,0,0) i get an error when running this code." file not found". i tried peacing different codes together but, i'm still learning. Sub Delete_test() Dim MyFolder As String Dim MyFile As...
  3. M

    Delete files based on last date accessed (or similar)

    Hi there, A while back I came across the code given below (not my own work, but I'm afraid I can't remember exactly where it came from - although it might be Chip Pearson or Ron de Bruin). It works really well, but I now have a slightly different requirement. Is it possible to modify this so...
  4. R

    Delete PDF Files from Workbook Folder Based on File Name Length

    I'm attempting to create a macro that runs during the Workbook_Open event which deletes all the PDF files from the directory the workbook is in where the file name has 53 characters before the ".PDF". Any help you could provide me with would be greatly appreciated!
  5. G

    Delete files in all subfolders

    Hi Folks: How can I delete all *.txt files in the main folder C:\Gennex and all its subfolders (several layers). I use excel 2003.
  6. D

    Delete Selective Files

    I have a folder named C:\General\ which contains several subfolders. Each subfolder contains around 20 files with different extensions such as csv, txt, xls, zip etc. I wish to keep Ad*.*, Bv*.*, and La*.* and delete all other files in the subfolders. I am aware that files deleted cannot be...
  7. D

    Delete, copy or move xls files

    I have the following folder: D:\Nov 11\..... There are subfolders for each working date (like 11012011, 11022011 etc) and each subfolder contains around 800 xls files. Out of these 800 files, I want to retain only 250 files and delete all other files. I have made a master file named...
  8. S

    nested do-while loop

    I have multiple folders(level 1) with folders (level 2) in them. I want to delete the level 2 folders (but not all of them). so I want to go in to folder 1 and delete folders a-g (but not h-z), then move to folder 2 and repeat the same thing. I have the list of the folder1's in column a...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top