How to make *.asd files invisible (OSX)

Share your Ableton Live secrets here
Post Reply
alpertt
Posts: 236
Joined: Thu Oct 10, 2013 2:34 am

How to make *.asd files invisible (OSX)

Post by alpertt » 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:

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

brianroach
Posts: 7
Joined: Mon Nov 12, 2012 8:49 pm

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

Post by brianroach » Thu Dec 21, 2017 9:37 pm

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?

jestermgee
Posts: 3160
Joined: Mon Apr 26, 2010 6:38 am
Contact:

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

Post by jestermgee » Fri Dec 22, 2017 1:01 am

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.

alpertt
Posts: 236
Joined: Thu Oct 10, 2013 2:34 am

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

Post by alpertt » Sun Jan 07, 2018 3:19 pm

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

Post Reply