Resolved How to hide a specific drive from desktop?

Discussion in 'Mac Basics and Help' started by Akarin, Jan 2, 2012.

  1. Akarin, Jan 2, 2012
    Last edited: Jan 2, 2012

    Akarin macrumors 6502


    Oct 16, 2011
    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!
  2. t0n3s macrumors newbie

    Jan 2, 2012

    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.

    tell application "Finder"
    	set name of disk "Untitled" to ".Untitled"
    	delay 1
    end tell
    2. You can use Terminal to change the flag attribute to make it hidden.

    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.

  3. Akarin thread starter macrumors 6502


    Oct 16, 2011
    Nyon, Switzerland
    Thank you very much for these solutions... Exactly what I was looking for. I'll go with solution n°2.
  4. ZipZap macrumors 603

    Dec 14, 2007
  5. Alessandro macrumors newbie

    Mar 30, 2011
    Actually, it does, but you must relaunch the Finder with this command:

    killall Finder
  6. kevinr621, Jan 5, 2013
    Last edited: Jan 5, 2013

    kevinr621 macrumors newbie

    Mar 2, 2010
  7. Mac&Coke macrumors newbie


    Jun 20, 2016
    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
  8. ThD39s5sty6uw56 macrumors newbie

    Apr 4, 2017
    Oslo, Norway
    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.
  9. joelc777 macrumors newbie

    Apr 19, 2015
    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
  10. archiegodfrey, Oct 20, 2017
    Last edited: Oct 20, 2017

    archiegodfrey macrumors newbie


    Mar 1, 2017
    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?
  11. Tech198, Oct 23, 2017
    Last edited: Oct 23, 2017

    Tech198 macrumors G4

    Mar 21, 2011
    Australia, Perth
    don't even need action script. Just found out this myself.

Share This Page