How to make *.asd files invisible (OSX)
Posted: Fri Jan 31, 2014 1:31 pm
Here is a small python script to hide all asd files on a given location and it's subfolders:
** Usage: save the script as "hide_my_asd.py" and call it from terminal:
** DATA is my audio samples' hdd, you should edit your own path. I used this on entire disk with no problems.
** 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:
to:
** As i said i tried this before post. But still, use it at your own risk.
** I am not a programmer, thanks to Python forum
** For all obsessive people out there like me, Cheers
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