mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
12 lines
381 B
Python
12 lines
381 B
Python
import os
|
|
|
|
for root, dirs, files in os.walk('.'):
|
|
for filename in files:
|
|
if filename.endswith('.js'):
|
|
file_path = os.path.join(root, filename)
|
|
try:
|
|
os.remove(file_path)
|
|
print(f'Successfully deleted: {file_path}')
|
|
except OSError as e:
|
|
print(f'Error deleting {file_path}: {e.strerror}')
|