Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a FAT disk image using Disk Utility and added files to it. I would like to hide some of these files from Windows. Is there a way to do this from OS X?

What I'm looking for is basically a Mac equivalent of attrib: a tool to set the Windows hidden attribute. Note that SetFile will NOT work, as it hides files from OS X, not Windows.

share|improve this question

migrated from Aug 13 '09 at 3:34

This question came from our site for professional and enthusiast programmers.

Setting the Hidden attribute isn't going to hide a file or folder from Windows. That attribute is only there to hide the file/folder in Explorer if it's set to hide them. – RobH Dec 14 '15 at 17:44

Some chmod implementations allow the changing of MS-DOS permissions.

EDIT: You can use DOSBOX to mount a volume in OS X to a directory, which may allow you to use the attrib command.

EDIT2: The Tcl 'file' command might work from the command-line too.

share|improve this answer

You must log in to answer this question.