I have a Windows 7 desktop which has 3 drive mappings to CIFS shares on a FreeBSD home server. There are also special folders (Desktop, etc) stored on the CIFS shares.

Each of these (including the special folders for some reason) has its own Recycle Bin settings, which I've configured such that the Recycle Bin is not used. However, I see a $RECYCLE.BIN folder created on my desktop every time I delete a file anywhere on my computer (including local disks which also have the Recycle Bin disabled) which is rather annoying. Inside this folder is always a desktop.ini. Normally I can't see other desktop.ini files on the local drives as I have protected OS files hidden.

I can't hide the folder as CIFS doesn't seem to store the hidden or system attributes (thus why I'm seeing the desktop.ini files also) despite telling the client to treat dotfiles as hidden.

  • A workaround might be to make your own zero length file named $RECYCLE.BIN and set its attributes to Read-Only and Hidden. I done something like that to prevent older versions of Windows from creating certain folders (like C:\Program Files\Movie Maker).
    – martineau
    Mar 8 '11 at 19:46
  • @martineau: I had already tried that, however the file cannot be hidden as I mentioned CIFS isn't storing the hidden/system attributes (unsure about read-only, but that's not relevant). Mar 8 '11 at 19:49

In the smb.conf file you have the ability to hide files from directory listings.

In the share you are concerned with add something like:

hide files = /desktop.ini/$RECYCLE.BIN/

which will hide the desktop.ini files and the $RECYCLE.BIN folder.


  • This definitely works, although it is a workaround. Mar 8 '11 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.