Hi all,
I want to search a file named myfile.pdf under the (sub)directory "C:\Program Files\", what's the search expression should I use for this case? I've tried the following one and it doesn't work at all:
"C:\Program Files\"myfile.pdf
Any hints on this issue? Thanks in advance.
Hongsheng.
Search expression for a file under a specific directory.
Re: Search expression for a file under a specific directory.
Separate the terms with a space,
For example to search for C:\Program Files\ and myfile.pdf:
For example to search for C:\Program Files\ and myfile.pdf:
Code: Select all
"C:\Program Files\" myfile.pdf
Re: Search expression for a file under a specific directory.
Dear David,
Thanks for your reply.
I've just use the following one according to your suggestions:
"C:\Program Files\" .tex
Considering that I've MiKTeX 2007 installed at the default location on my system, it should return so many results by the above operation. But I just get nothing. Why does this happen?
Thanks again.
Thanks for your reply.
I've just use the following one according to your suggestions:
"C:\Program Files\" .tex
Considering that I've MiKTeX 2007 installed at the default location on my system, it should return so many results by the above operation. But I just get nothing. Why does this happen?
Thanks again.
Re: Search expression for a file under a specific directory.
What search options do you have enabled?
Make sure regex is disabled.
Make sure regex is disabled.
Re: Search expression for a file under a specific directory.
Thanks, I've got it. I really enable the regex in my case. Now, I disable this option andy this issue is solved. Thanks a lot.
But I still cann't figure out why my issue should happen if I enable the regex, could you please give me some more hints?
Kind regards,
Hongsheng.
But I still cann't figure out why my issue should happen if I enable the regex, could you please give me some more hints?
Kind regards,
Hongsheng.
Re: Search expression for a file under a specific directory.
Regex uses \ to escape certain characters.
You would need to replace each \ with \\
For example to find all your myfile.pdf files in c:\program files use the following regex syntax:
See http://en.wikipedia.org/wiki/Regex for more information.
You would need to replace each \ with \\
For example to find all your myfile.pdf files in c:\program files use the following regex syntax:
Code: Select all
^c:\\program files\\.*myfile\.pdf$
Re: Search expression for a file under a specific directory.
But the more strange thing is that:
1- When I enable the regex for everyghing, the following expression will give me nothing:
^c:\\program files\\.*\.tex$
2- When I disable the regex for everyghing, the following expression will give me right results:
"C:\Program Files\" .tex
Why does this happen?
Kind regards,
1- When I enable the regex for everyghing, the following expression will give me nothing:
^c:\\program files\\.*\.tex$
2- When I disable the regex for everyghing, the following expression will give me right results:
"C:\Program Files\" .tex
Why does this happen?
Kind regards,
Re: Search expression for a file under a specific directory.
Using a \ in the search when regex is disabled will force match path on.
However, when regex is enabled you will need to toggle match path on manually.
However, when regex is enabled you will need to toggle match path on manually.
Re: Search expression for a file under a specific directory.
Good, thanks a lot, I've got it.
David wrote:Using a \ in the search when regex is disabled will force match path on.
However, when regex is enabled you will need to toggle match path on manually.