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've got a MacBook laptop in the house, and when Mac OS X copies files over the network, it often brings along hidden "dot-files" with it. For instance, if I copy "SomeUtility.zip", there will also be copied a hidden ".SomeUtility.zip" file. I consider these OS X dot-files as useless turds of data as far as the rest of my network is concerned, and don't want to leave them on my Windows file server.

Let's assume these dot-files will continue to happen. i.e. Think of the issue of getting OS X to stop creating those files, in the first place, to be another question altogether.

Rather: How can I use Windows Explorer to find files that begin with a dot / period? I'd like to periodically search my file server and blow them away. I tried searching for files matching ".*" but that yielded – and not unexpectedly – all files and folders.

Is there a way to enter more specific search criteria when searching in Windows Explorer? I'm referring to the search box that appears in the upper-right corner of an Explorer window. Please tell me there is a way to escape my query to do what I want?

(Failing that, I know I can map a drive letter and drop into a cygwin prompt and use the UNIX 'find' command, but I'd prefer a shiny easy way.)

share|improve this question
1  
i thought cygwin was the shiny easy way! :) –  quack quixote Apr 18 '10 at 15:50

7 Answers 7

up vote 9 down vote accepted

Use Window's "Search Advanced Query Syntax", which basically lets you do stuff that Vista and XP advanced search used to let you (that Windows 7 hid). Read about it on MSDN.

Hence, you can just search filename:. to find all files with a file name that begins with "."

share|improve this answer
    
thanks, I have an icon library from all the free downloads i encounter. Have just deleted 25k files starting with . –  Valamas Oct 12 '11 at 23:18
    
The link seems to be (effectively) broken (it redirects to windows.microsoft.com/en-US/windows/downloads/windows-xp). –  Peter Mortensen Apr 6 '12 at 14:35
    
@PeterMortensen fixed! –  Vervious Apr 6 '12 at 17:14
    
+1 For a new toy. –  Eddie B Nov 27 '12 at 20:24

The windows Command prompt method to find all "dot files" in all directories below the current directory, but excluding directory names beginning with dot:

dir .*.* /s /a-D
share|improve this answer
1  
+1 for not resorting to 3rd party programs, although I think you mean "including directories below", as that's what /s does –  RJFalconer Apr 18 '10 at 16:29
    
dir \.* only returns .rnd (what this is, I don't know). If you want to see the files that start with a ., you need to use dir .*.*. –  raven Apr 18 '10 at 16:58
    
To clarify - the /s searches all subdirectories, but the /a-D excludes directory names beginning with dot. I'll edit the answer to make it clearer. –  Mike Apr 19 '10 at 1:39

If you're willing to use a free 3rd party application, I highly suggest Locate32. You can search using regular expressions.

:^\. finds the files you are looking for. (You could also opt to exclude directories from results.) As a bonus, Locate32's index and search is much faster than the built-in Windows search. Plus the right-click context menu gives you some extra options like "Copy path to clipboard" and "Compute MD5."

I've created an AHK script so I can quickly bring up Locate32 with Win-F3.

share|improve this answer
    
Your image is broken. Do you happen to have the original that you could reupload? Thanks. –  8088 Sep 29 '11 at 5:04
    
@Gareth: Dude, are you like some type of robot? I couldn't find the original image... –  Leftium Sep 29 '11 at 15:33

In Windows XP I was able to use Windows Explorer to search for .?* to see all files and folders that begin with a dot. Perhaps it works the same in Windows Vista and Windows 7.

Be careful, for me this returned files and folders, files and folders inside zip files, files and folders as seen in the Explorer Recycle Bin, and files and folders as seen in the Command Prompt RECYCLER folder. The search will likely also find files and folders as seen in other special folder views Explorer has.

share|improve this answer
    
Thanks for the suggestion, but I just tried this and it also seems to return all files and folders in Windows 7, not just those beginning with a period. –  Chris W. Rea Apr 18 '10 at 19:59

You can stop the Mac creating the .DS_Store files with this command in Terminal:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

Then log out and in again (or reboot). That should fix it. As for the other files, this is a well-known problem and I haven't been able to find a quick answer.

share|improve this answer
1  
There are not one, not two, but three tags on this post mentioning windows and yet you provide a mac solution. –  Eddie B Nov 27 '12 at 20:20

Late addition ... I'm adding this as it comes in quite handy to set attributes from the command line for dot files (or directories) ...

The first dot is to search the current directory; the second is 'back-slashed escaped' to search for names starting with a dot literal.

dir ".\.*" /A 
share|improve this answer

filename:.*. -kind:folder

This finds all files which begin with a period, even those which do not have an extension. -kind:folder excludes folders from the search. Tested on Windows 7. Should work on Vista and Windows 8.

share|improve this answer

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.