Code: Select all
#!/usr/bin/env python
# encoding: utf-8
import os, subprocess
path = "/Volumes/DATA" # write your own path here
for root, dirs, files in os.walk(path):
for i in files:
if i.endswith(".asd"):
abspath = root + "/" + i
print i
subprocess.call(['chflags', 'hidden', abspath])
** Usage: save the script as "hide_my_asd.py" and call it from terminal:
Code: Select all
python hide_my_asd.py
** Suggestion: to be cautious, first run it under a limited space. Like: /Volumes/DATA/samples/blahblah" This way it works under only blahblah and its subfolders.
** if you save the script on desktop and try to run it on an external hdd, it throws an error. Must be saved in the disk where actual audios are.
** To make asd files visible again, change the last line:
Code: Select all
subprocess.call(['chflags', 'hidden', abspath])
Code: Select all
subprocess.call(['chflags', 'nohidden', abspath])
** I am not a programmer, thanks to Python forum
** For all obsessive people out there like me, Cheers