Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello.
Ages ago I posted a problem in this thread: http://computing.net/dos/wwwboard/forum/13233.html
The solution that Secret_Doom gave was fantastic, but I've recently discovered a strange prroblem. You see, the numbers I have in the word files are all stored in a table. So each cell contains one number. For some reason, the number in the very first cell (top-left cell of the table) is not being found by the search command. I've had a look at the word file in notepad and it looks like this:
NUMBER497623497147497586497128497501497118
Now, the first number, in this case 497623, is not being found. For reference, the word NUMBER is text written on the word page outside the table.
What's also odd is the above is opening the file under XP. Under 2000, the dots are replaced with small rectangles, like a smaller version of this [], but closed. And there is one between the word NUMBER and the first number, whereas above there is not.
Can anyone figure out how to get the search to find the first number in the table please?

Something I noticed when posting the above stood out as odd which may indicate the problem.
When I copied and pasted the line from notepad it appeared like this:
NUMBER
497623497147497586497128497501497118
There is a big gap between the word NUMBER and the first number. This doesn't show up in notepad. Only when pasting it into this window. Could that be the problem? I edited the paste in the first post to show what the file looked like in notepad.

I am not sure, but try the following fix to the "magic" Secret_Doom statement
FINDSTR "^[0-9]%1[^0-9] ^%1[^0-9] [^0-9]%1[^0-9] ^%1$ [^0-9]%1$" "c:\path\path\path\*.doc"

Tony,I miss Leonardo too. What if you replace the number in cell 1 with zero's or X's? Would that cause a problem with the table or your batch file?
After reading Leonardo's post, the following comment may be the key here:
"That will only match the string on %1 if it is surrounded by non-numeric characters (or by line breaks)."
Surrounded by looks like it might be the answer. Can you toss a line break in?
Skip

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |