Hi, this is a continuation of an earlier thread but I cannot seem to find a resolution.
I am setting the following:
path:My Documents folder:NavBackup
and get returned all of the files in the NavBackup folder (which is in My Documents), and its subdirectories as I would expect. However, this procedure doesn't work for all folders in My Documents. When I query with:
path:My Documents folder:c#
a list of files from locations other than My Documents\c# are also returned. The same happens with:
path:My Documents folder:My Pictures.
Again files (all of them images of some kind) located outside of My Pictures are returned in the results.
What am I doing wrong :) What is the correct syntax for a search within a specified directory in My Documents

Search syntax problems
DanDMan
Hi Bob,
Sorry about the name mix-up. I had just replied to Drik in another thread :-)
Alright, I did some testing. It wasn't exhaustive, but I was able to get WDS to find all the documents inside a c# folder under My Documents by using the following syntax:
foldername:"c#" under:"My Documents"
This query returned only the files stored in the c# folder. Other queries I tried seemed to return results from the c# folder and several others.
I hope this works for you.
Paul Nystrom - MSFT
Harry He
BHGreene
Hello Dirk,
I've had success using the following syntax:
folder:My Pictures under:My Documents
I hope this helps.
Paul Nystrom - MSFT
dummy#1
Thanks for your reply Paul, this does seem to work in the main.
The only problem I still seem to have is with my "c#" folder. When I set:
folder:c# under:My Documents
I get some really perculiar results. If I search using '*' I get a set of results that includes seemingly unrelated locations and files. If I instead search using ANY other string I get a set of results twice as big ( ! ), again with more seemingly unrelated files. This includes searching with totally gibberish strings.
Now if I use desktop search, and specify the same (c#) folder I get the correct results returned (so there must be a way of doing it!). Interestingly however, if I specify no folder restrictions and enter the search phrase "c#" I get nothing returned. Not even the folder itself.
Can anyone try creating a "c#" folder (I suspect any foldername with the '#' character will suffice) and see if they have any luck returning consistant results
Cheers,
Bob (or Dirk if you like)
P.S. The above method also seems to fail on My Pictures, My Videos and My Music directories. Any thoughts