11

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.

2
  • 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
    Commented Mar 8, 2011 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). Commented Mar 8, 2011 at 19:49

1 Answer 1

4

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.

http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#id2543596

1
  • This definitely works, although it is a workaround. Commented Mar 8, 2011 at 21:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .