delete-file-home-assistant
delete-file-home-assistant copied to clipboard
Feature request: include string pattern for exclusion files
It would be nice to have an official release to include a string instead of the exact file name to exclude.
Line 153:
Current code:
if except_files != []:
if file in except_files:
remove_file = False
Modified code:
import re
...
if except_files != []:
for pattern in except_files:
if re.search(pattern.lower(), file.lower()):
remove_file = False
break
else:
remove_file = True
Let me know what you think.
Thanks and keep up the great contribution.