Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
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). –  Alan Pearce Mar 8 '11 at 19:49

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer
    
This definitely works, although it is a workaround. –  Alan Pearce Mar 8 '11 at 21:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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