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.

There are a lot of applications that uses the dot notation + application name to store it's data. This is common on *NIX systems but it's not recommended by FreeDesktopStandards, in fact they should use the $XDG_CONFIG_HOME variable, which usually is mapped to $HOME/.config directory.

For instance is very common for an application xyz to create in the current User default folder the following folder ~/.xyz to store it's data. I tried mapping $XDG_CONFIG_HOME to the Windows equivalent variable (%APPDATA%), but no luck.

So my question is, is there a way to definitely hide these dotted folders?

Example: enter image description here

share|improve this question
1  
File bugs with the relevant projects. If enough people pester them, this might get fixed. –  Mechanical snail Sep 2 '11 at 1:55
add comment

1 Answer

up vote 4 down vote accepted

You can set the files as hidden by opening the command prompt and running:

for /f %f in ('dir C:\Users\Marcos\.* /b') do attrib +h %f

This will look for any files and folders in C:\Users\Marcos\ beginning with a period and mark them with the hidden attribute. You can make this recuresive (i.e. it will search sub folders) by adding /s inside the single quote containing the dir command.

You can also specify a different folder, by changing the path (or removing the path and running it in the desired directory.

As long as explorer is set to not show hidden files and folders you won't see them anymore, otherwise you will see them but they are slightly transparent.

share|improve this answer
    
I see that the world needs a Useless Use of FOR award to go alongside the Useless Use of cat award. ☺ –  JdeBP Sep 2 '11 at 7:25
    
@JdeBP: This is more like useless use of `ls` instead of wildcards. The for loop itself (for /r?) does make some sense for recursively finding all files/directories matching .*. (Does attrib even accept wildcards?) –  grawity Sep 2 '11 at 9:30
    
Yeah, apparently attrib does accept wild cards, I thought it didn't and only tested it now that @grawity mentioned it. Ahh well, answer is good if you need recursion (check the entire partition?). attrib +h .* would have done the trick in this particular case. –  Windos Sep 2 '11 at 9:44
1  
Not only does attrib accept wildcards, it also has an /S option. (It didn't have /S prior to MS-DOS 3.3. But it has pretty much always supported wildcards, and always supported /S on Windows NT, if memory serves correctly, which is the target system here.) It truly is FOR that is uselessly used in cases such as this. –  JdeBP Sep 2 '11 at 10:16
add comment

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.