I need to find the word ="HQDFSQL"/>
using the FindStr
command in a batch script.
What query should I use to accomplish this?
Asked
Active
Viewed 2,627 times
2

James
- 1,928
- 3
- 13
- 30

nancy prabhasini
- 31
- 1
- 2
-
In general, special characters can be escaped on the command line by prefixing them with **ctrl-V**, which will appear on the screen as `^V`. – Jeff Zeitlin Aug 02 '18 at 14:43
-
6Enter `FindStr /?` at the Command Prompt and read the usage information. Please take the [tour] and read [ask] before [editing your question](https://stackoverflow.com/posts/51656320/edit) to include a [mcve] of the batch file content you have tried along with what was returned. – Compo Aug 02 '18 at 14:45
-
Under the regular expression reference for the `FINDSTR` help file, it says `\\` is the escape character. – Squashman Aug 02 '18 at 14:45
-
@JeffZeitlin - What command line are you using? I've only seen control characters appear like that in Linux. – SomethingDark Aug 02 '18 at 14:58
-
3As a side note, have you considered the `Find` command as an alternative? – Compo Aug 02 '18 at 14:58
-
@SomethingDark - Windows command prompt, which is where the tag [tag:batch-file] applies to. – Jeff Zeitlin Aug 02 '18 at 14:59
-
@Squashman - and the backslash will itself have to be escaped (with `^V`) on the command line because it's a special character to Windows. – Jeff Zeitlin Aug 02 '18 at 15:01
-
`findstr "=\"HQDFSQL\"/>"`? – aschipfl Aug 02 '18 at 15:13
-
@JeffZeitlin - I am aware that [batch-file] is applicable to Windows (it's the only tag I look at), but I've got a command prompt open and I'm pressing CTRL+V and nothing is happening. – SomethingDark Aug 02 '18 at 15:49
-
Oh wait, I needed to use legacy mode – SomethingDark Aug 02 '18 at 15:51
-
Thank you @aschipfl , the command worked !!!! – nancy prabhasini Aug 03 '18 at 10:32