Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

0000757

macrumors 68040
Original poster
Dec 16, 2011
3,893
850
I have a WD Elements 1TB 3.0 Portable external drive that I use with my computer. It's been broken into 3 partitions.

The first is my normal "Portable" drive, about 600GB, that I use to store things like my VMs, FCPX libraries, etc. It's exFAT because I need to be able to use it across multiple computers both OS X and Windows.

The second is my Time Machine backup, Mac OS Extended, and it's 250GB.

The final is my "Windows Extras", around 150GB, and is formatted NTFS, because I want to store certain Windows applications on it to have room on my SSD for more important things. It's ONLY for use with my Bootcamp partition.

Now, is there a way I can hide my "Windows Extras" partition from appearing in Finder, or, at the very least, from the Desktop? I still want to be able to see the Time Machine drive and the Portable drive, however. I tried searching but I didn't really find anything useful other than to turn off all the drive icons.

Also, since it's a portable drive, when I unplug it (after safely ejecting of course), will the assigned hidden properties stay?
 
In the finder you can just remove it from the sidebar, no idea if that solution is a 'sticky' one though
 
I use variants on this AppleScript I wrote back in 2010 to change Desktop visibility.
It still works under Yosemite
Code:
-- Drive Visibility Toggler
-- BP 2010 - November 2014 (Yosemite tightened restrictions, so System Events won't set visible flag easily any more)
-- Toggles the desktop visibility of an individual drive. This does NOT affect visibility in file Dialogs.
-- Finder prefs for visibility are preserved, simply superceded by this lower level flag.
-- Won't work on boot partition, or bootable partitions without either sudo or admin privileges.  (UNIX -> GetFileInfo SetFile)
-- Using Admin privileges, it will sometimes ask for admin password. That's as it should be.

-- If you use it on a network drive, visibility changes will affect all users. Don't be a jerk.
-- Invisibility will survive unplugging drive and attaching it to another Mac.

-- You must manually target the drive by inserting its name correctly in the next line of code:
------------------------------------------------------------------------------------
----------- user settable variables
set drivename to "Tardis" -- **** Set this to the name of the drive you want to act on. ****
----------- end of user settable variables
------------------------------------------------------------------------------------

set quoteddrivename to quoted form of drivename
try
    set attribs to (do shell script "GetFileInfo -a /Volumes/" & quoteddrivename) as text
on error
    beep (1)
    return
end try

try
    considering case
        if attribs contains "v" then
            do shell script "SetFile -a V /Volumes/" & quoteddrivename with administrator privileges
        else
            do shell script "SetFile -a v /Volumes/" & quoteddrivename with administrator privileges
        end if
    end considering
on error
    beep (1)
    return
end try
do shell script "killall Finder" -- Restart the Finder to show changed visibility

I Find toggling works better than setting to a specific state, because whenever I want to run this script, it's because I want to Change the vis state of a drive. "Tardis" of course, is a Time Machine volume.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.