make hidden ram disk in mavericks

can please someone tell me how to create a hidden ram disk with apple script automator in osx mavericks? thanks very much!
for now i use this
set volumes to do shell script “ls /Volumes/”

set device_path to do shell script “hdiutil attach -nomount ram://2097152”

do shell script "newfs_hfs -v RamDisk -s " & device_path

do shell script "diskutil mount " & device_path
works perfectly but i d like to hidi it from desktop thanks

Hello.

I think you can use the chflags command that has a good man page that goes with it. :slight_smile:

set volumes to do shell script “ls /Volumes/”

set device_path to do shell script “hdiutil attach -nomount ram://2097152”

do shell script "newfs_hfs -v RamDisk -s " & device_pathCL

chflags hidden “/Volumes/RamDisk”

do shell script "diskutil mount " & device_path
itried to add uderlined item but in mavericks won t work any suggestion?

Hello.

I think I have found a way.

You also need to be sure that Finder doesn’t display hidden files:

thanks for the reply but it didn t work see screen shot
in english erro means variable not definied
screenshot : https://copy.com/Mfy2k9pdtUvw

Hello.

In applescript, the line should look like:

do shell script "SetFile -a V /Volumes/RamDisk"

thanks should work but requires me to download xcode:(

Hello.

If I have read the Xcode documentation right, I have read that stubs for the command-line tools are included in the basic Mavericks install, but when you install Xcode then the stubs are made to point to the utilities included with Xcode.

So I’d try to execute ‘which SetFile’ in a terminal window first, and only then download Xcode, which is free, if you don’t get a positive result for the command (it is installed in /usr/bin on my machine).

(To register as a Developer is Free.)

Xcode is on my machine, but there is no Setfile command available.

Oops, it’s available as /usr/bin/SetFile
but Spotlight failed to find it !

Yvan KOENIG (VALLAURIS, France) lundi 17 mars 2014 10:19:39

Easiest way is not mounting the volume in /Volumes but somewhere else to make an file system not popup in the Finder. /Volumes is an hidden folder for the Desktop Mac OS X, but not necessarily to work properly.

Hello.

I also think that you can just download and install comman-line tools, without XCode from developer.apple.com (after having signed up for a free membership.)

Those tools are quite nice to have when you need them! :slight_smile: