Hiding Files?

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?

Macbook White Late 07, 500GB, 2.1GHZ, 4GB, Mac OS X (10.5.8)

Posted on Mar 29, 2010 8:54 PM

Reply
14 replies

Mar 30, 2010 5:27 AM in response to L1ONE

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

Mar 30, 2010 6:39 AM in response to Tony T1

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.

Mar 30, 2010 7:20 AM in response to L1ONE

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

Mar 30, 2010 8:25 AM in response to L1ONE

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

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Hiding Files?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.