Skip to content

Instantly share code, notes, and snippets.

View chafouin's full-sized avatar

Vincent Chafouin chafouin

View GitHub Profile
@jarun
jarun / remexe.py
Created October 4, 2017 20:55
Remove executable permission for media files recursively
#!/usr/bin/env python3
import os
import stat
extns = ['.aac', '.avi', '.flac', '.m3u', '.m4a', '.mkv', '.mp3', '.mp4', '.smi', '.srt', '.sub', '.webm', '.wma']
for root, dirs, files in os.walk('.'):
for entry in files:
fname, ext = os.path.splitext(entry)