Find text string or part of text with dot in grepWin
Solution 1
Grep stands for g/re/p (global / regular expression / print)
It searches IN files, not file names. That text would need to be text-readable in the file for which you are searching.
In the directory you want to search you could do something like:
dir *.* /b/s > my_file.txt
Then you can perform your regular expressions checks with grepWin on my_file.txt
In Unix and Linux you normally pipe the commands via the command line:
ls -a | grep \.tree$
In Windows you would use
dir * /b | findstr \.tree$
Solution 2
I learned that gripWin is for searching IN files, I am looking to search parts of filenames of files, not in them, but simply their names. Hence I am now reading this: https://superuser.com/questions/209231/what-search-utilities-can-search-by-file-name-in-windows-7
Thanks for explaining this crucial misunderstanding to me, cpattersonv1.
lowtechsun
Profile picture "Showers of Sunshine" by Linda Tuma Robertson http://www.ltr-art.com/
Updated on June 05, 2022Comments
-
lowtechsun over 1 year
I am using grepWin on Windows 7 64. http://tools.tortoisesvn.net/grepWin.html
I have a folder with files and their duplicate copies.
The original files are named "FILENAME DOT FILETYPE" (without spaces), for example "cartonbox.shelf".
The copies of these file are named "FILENAME DOT 1 DOT FILETYPE" (without spaces), for example "cartonbox.1.shelf".
I am trying to find all files that contain the exact string:
"DOT 1 DOT FILETYPE" (without spaces), so all files that have for example ".1.shelf" in them.
How can I do that in grepWin please?
If I try "
\.1\shelf
" or "\.1\.shelf
" for example I do not get any results.What is my mistake please? Been reading http://www.regular-expressions.info/ but cannot come up with correct pattern.
How can I generally search for an exact part of the filename regardless of symbols?
Basically if the file I want to find has for example "garden_1.1.4-JE50.tree" in it how do I tell grepWin to find this exact string of text including underscore, dots or other characters?
-
lowtechsun over 10 yearsTried that as well but get no matches unfortunately.
-
lowtechsun over 10 yearsAlso added the dollar sign at the end of the pattern and it does not come up with any matches. For Search I have ticked Regex Search, under Limit search I have All sizes and Regex match ticked, though in the form field above it is empty. Those should be the correct settings, no?
-
lowtechsun over 10 yearsOh gosh, so this means also the Text Search option of grepWin will not find the files? What app/tool/software can do this then?