Page 1 of 1

How to make *.asd files invisible (OSX)

Posted: Fri Jan 31, 2014 1:31 pm
by alpertt
Here is a small python script to hide all asd files on a given location and it's subfolders:

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
** 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:

Code: Select all

subprocess.call(['chflags', 'hidden', abspath])
to:

Code: Select all

subprocess.call(['chflags', 'nohidden', abspath])
** 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 :)

Re: How to make *.asd files invisible (OSX)

Posted: Thu Dec 21, 2017 9:37 pm
by brianroach
Thanks for sharing!

Does this work moving forward, i.e. for new samples that are analyzed by ableton whose .asd files are created after this script has been run?

Re: How to make *.asd files invisible (OSX)

Posted: Fri Dec 22, 2017 1:01 am
by jestermgee
By the look of the script I would say No.

It's simply checking the file type for .asd and if it is True it sets the "hidden" attribute. You would need to run it periodically to hide new files.

Not sure if there is a way on Mac but on PC you can set things like that in the registry for a specific file type to be given certain attributes.

Re: How to make *.asd files invisible (OSX)

Posted: Sun Jan 07, 2018 3:19 pm
by alpertt
@jestermgee is right.

BTW after 4 years i have learned that Ableton has this "do not create *.asd file" option is in the prefs lol..
You raised my stupitidy from the dead :lol: