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

Akarin

macrumors 6502
Original poster
Oct 16, 2011
290
17
Nyon, Switzerland
Hi all,

I've been searching without any luck about how to accomplish this simple task:

I have an external hard drive with 3 partitions on it, A, B and C. On the desktop, I see A, B and C drives but how do I hide (or remove from desktop) drive B? I know I can eject it but it's a bit of a hassle to eject it each time I plug the hard drive or boot my Mac. Any way to do this?

Thank you!
 
Last edited:

t0n3s

macrumors newbie
Jan 2, 2012
11
3
Howdy

There seems to be a few ways to do this, you can take your pick depending on what you actually need or use the partition for.

1. You can use Applescript to add a period prefix onto the drive name, hiding it from Finder.

Code:
tell application "Finder"
	set name of disk "Untitled" to ".Untitled"
	quit
	delay 1
	launch
end tell

2. You can use Terminal to change the flag attribute to make it hidden.

Code:
chflags hidden "/Volumes/Untitled"
chflags nohidden "/Volumes/Untitled"

3. You can turn off the functionality to display external hard drives on the desktop and simply have shortcut icons for the ones you do want access to.

Changing attributes means you may have to restart the Finder app and the format of the partition will need to be Mac specific.

Good-luck.
 

Mac&Coke

macrumors newbie
Jun 20, 2016
1
0
Howdy

There seems to be a few ways to do this, you can take your pick depending on what you actually need or use the partition for.

1. You can use Applescript to add a period prefix onto the drive name, hiding it from Finder.

Code:
tell application "Finder"
    set name of disk "Untitled" to ".Untitled"
    quit
    delay 1
    launch
end tell

2. You can use Terminal to change the flag attribute to make it hidden.

Code:
chflags hidden "/Volumes/Untitled"
chflags nohidden "/Volumes/Untitled"

3. You can turn off the functionality to display external hard drives on the desktop and simply have shortcut icons for the ones you do want access to.

Changing attributes means you may have to restart the Finder app and the format of the partition will need to be Mac specific.

Good-luck.

Trying to do this with a windows volume , I installed a separate drive about a month ago just for windows but having a permission issue, was curious if you had any ideas without corrupting windows volume permission =)

Here is what i get when i enter terminal cmd , chflags hidden "volume here"

chflags: /Volumes/Untitled: Read-only file system
 

ThD39s5sty6uw56

macrumors newbie
Apr 4, 2017
1
0
Oslo, Norway
Code:
chflags hidden "/Volumes/Untitled"

Not quite resolved for me I'm afraid. I did this a while back with a network drive and it worked very well. Today however I tried it with my Time Machine backup drive which I don't really want to look at every day, and was told that I lack permissions to hide it.

I am logged in as an administrator.
 

joelc777

macrumors newbie
Apr 19, 2015
1
1
USA
Code:
chflags hidden "/Volumes/Untitled"

Not quite resolved for me I'm afraid. I did this a while back with a network drive and it worked very well. Today however I tried it with my Time Machine backup drive which I don't really want to look at every day, and was told that I lack permissions to hide it.

I am logged in as an administrator.
I also got this message, but I typed "sudo !!" without the quotes and I was able to type in my password and then "killall Finder" to see the desired result. You could also type sudo chflags hidden "/Volums/Untitled" to get the same result
 
  • Like
Reactions: vkd

archiegodfrey

macrumors newbie
Mar 1, 2017
1
0
Trying to do this with a windows volume , I installed a separate drive about a month ago just for windows but having a permission issue, was curious if you had any ideas without corrupting windows volume permission =)

Here is what i get when i enter terminal cmd , chflags hidden "volume here"

chflags: /Volumes/Untitled: Read-only file system

Did you find out how to do this as I've encountered the same problem? I'm trying this cmd,
sudo SetFile -a V /Volumes/"Drive Name"
with "killall finder" but am being prompted to download some developer tools called Xcode from the store. However this file is 5.5gb! Ill let you know if it works....

Ive tried it with the above cmd but get this .......
ERROR: Write Permissions Error. (-61) on file: /Volumes/BootCamp

Its a Windows external boot disk. I take it, its the EFI partition thats preventing this?
 
Last edited:

Tech198

Cancelled
Mar 21, 2011
15,915
2,151
don't even need action script. Just found out this myself.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.