Benches macOS

14

Hiding Files?

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Hi,

I am a user of 10.5.8 and Ableton Live.

Now ableton live creates these files everywhere called .asd files, they are used for sample analysis within the program blah di blah.

Is there any script I can run or terminal command to make all .asd files hidden?

They need to still be accessible by the program and moving them to a seperate folder won't work.

I was looking on the Ableton support forum, and there was a user submitted command for Windows CMD which is

*"The first thing you will need to do is to create a .bat file,*

*right click on the desktop and select "new",*

*then "text document"*

*double click on it and copy the following line only, and paste it in*

*attrib +r +s +h c:*.asd /s /d*

*then click "file", then "save as" and name the file something like "hideasd.bat"*

*I have presumed in this instance that c: is the drive in which you wish to hide the files on, if you have multiple drives just make another file and replace the "c:" in the line of code with "d:" or whatever drive letter you have assigned*

*then close notepad*

*you should now see a newly created .bat file on your desktop"*

I was wondering whether this could be duplicated onto Mac Os X?

14 replies

Sign in or join Beachball Help to reply.

  1. 0

    Obj-D

    Imported from the Apple Support Forums via the Wayback Machine 🔗


    # Show '/file'
    $ sudo SetFile -a "v" /file
    # Hide '/file'
    $ sudo SetFile -a "V" /file

    Restart Finder

    ====

    Command-Shift-.

    or

    Command-Shift-,

    shows hidden files in open en save dialogs

    HTH

  2. 0

    L1ONE

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Will the above only hide .ASD files? Because it doesn't look as if it does.

  3. 0

    Obj-D

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Did you replace the file with your file path?


    # Show '/file' with space escape
    $ sudo SetFile -a "v" /your/path/to your/file.asd
    # Hide '/file' with quotes
    $ sudo SetFile -a "V" "/your/path/to your/file.asd"

    Another hint to show them.

    If you create a applescript app with Applescript Editor and you put that file on a save place ( means not ove it arround ). Then drag it to your finder toolbar. You can use that to show or hide your files easely in the finder.

    This is the AS code


    tell application "Finder" to quit
    try
    set isVisible to do shell script "defaults read com.apple.finder AppleShowAllFiles"
    on error errorMessage number errorNumber
    set isVisible to 0
    end try
    if isVisible = "0" then
    do shell script "defaults write com.apple.finder AppleShowAllFiles 1"
    else
    do shell script "defaults write com.apple.finder AppleShowAllFiles 0"
    end if
    delay 0.3
    tell application "Finder" to activate

    HTH

  4. 0

    L1ONE

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Would it be possible to use a wildcard when doing this, It creates an ASD file for every file I import into Ableton, so there are literally thousands of them.

    Would it be possible to use *.asd

  5. 0

    L1ONE

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Also I'm getting an error,

    Syntax Error

    "Expected End Of Line, etc. but found unknown token."

  6. 0

    Tony T1

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Try chflags hidden [file]. nohidden to unhide

  7. 0

    L1ONE

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I don't understand what you mean Tony T1

    I'm not too great with Unix/Mac commands, however if I'm told what to do I will be able to do it fine.

    I couldn't get what the other guy said to work either, I tried in Terminal, and it did nothing, and also tried in Script Editor however was getting Syntax Errors.

  8. 0

    Tony T1

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Are the .asd files all in one directory? You say 'everywhere', but can you be more specific?

    If you don't know, run the following in Terminal and let me know what directories hold the files:

    find / -iname '*.asd' 2> /dev/null

    (this will take a few minutes to run)

  9. 0

    L1ONE

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    They are mainly in a sub directory called /Users/Luke/Music Production/Samples/

  10. 0

    Obj-D

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    However I never done this, if you want to do this automicaly, you have to create a folder action for the parent folder and let the action walk through the folder and execute the above line to hide the files.

    You have to check if the folder action uses that current folder as CD.


    cd /Users/Luke/Music Production/Samples/ # maybe needed if folder action doesn't use the current folder.
    find . -name *.asd | while read file
    do
    echo "${file} will be hidden"
    SetFile -a "V" "${file}"
    done

  11. 0

    L1ONE

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi again,

    Thanks for that info, however where do I put it or use it? I'm guessing its the terminal, but I just want to be sure before I mess about with it. Also, I'm guessing it will have to be run everytime new ones are created right? If so I can make an automator task to run at startup.

  12. 0

    Tony T1

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    They are mainly in a sub directory called /Users/Luke/Music Production/Samples/

    In Terminal try:

    chflags hidden /Users/Luke/Music Production/Samples/*.asd

    If you want an Automator task, use the action Utilities->Run Shell Script and put in place of the "cat" that is in the Automator example.

  13. 0

    L1ONE

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    That Terminal Command worked perfectly. 😀

    Only bug is I have to use killall Finder after it, because it disables keyboard functionality in the Finder after entering it. :S

    Now to try and figure out automator to run this when new files are created there.

  14. 0

    Tony T1

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Only bug is I have to use killall Finder after it, because it disables keyboard functionality in the Finder after entering it. :S

    That should not be necessary.

    Now to try and figure out automator to run this when new files are created there.

    Well, launchd is really the tool for this. The GUI app Lingon is an easy way to write the launchd plist.

    To d/l Lingon:
    http://sourceforge.net/projects/lingon/files/Lingon/2.1.1/Lingon-2.1.1.zip/downl oad

    In Lingon, you need to create a new My Agent, put:

    chflags hidden /Users/Luke/Music Production/Samples/*.asd

    in Box 2 (Box 1 is whatever you want to name this), and in Box 3, select "Run When This File Is Modified",

    and put

    /Users/Luke/Music Production/Samples/

    into the box (no quotes, no escapes '').

    (Note: you do not want to use "Run if anything is placed in this Folder" and this only works if you use an empty folder to process and move files, as the folder must be cleared after each run. Same goes for Apple's "Folder Actions")