18 May 2015
Simple recursive file remover I use for removing annoying files such as the
.DS_Store files in OS X.
The default behavior is to remove
.DS_Store files, from the current folder and all its sub-folders, but you can use it with any regular expression.
Written in Elixir.
(I also used this to play with ANSI formatting…)
iex -S mix
FileRemover.run("/cool_folder", ~r/\.DS_Store/, :ask)
You can use the following modes:
:ask- Ask if you want to delete or not.
:delete- Delete immediately without asking.