Skip to main content
edited tags
Link
Drew
  • 80.9k
  • 10
  • 125
  • 265
edited tags
Link
shynur
  • 6.2k
  • 1
  • 6
  • 29
Source Link

How to delete all the files matching regular expression in elisp?

I want to make some clean-up with auto-generated files. How can I delete all the files matching some regexp mask from within elisp? As an example of desired functionality... Something like the line below:

(delete-file "*.txt") 

should delete all the text files in the current working directory...