The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
44 views

Getting value from file using Windows Batch scripting

Using Windows Batch scripting, I want to get the max_volume value (-2.9 in the following example) from a ffmpeg output written to a log file: [Parsed_volumedetect_0 @ 0000000005428b20] n_samples: ...
0
votes
0answers
15 views

Findstr sometimes returns big blocks of text?

When using findstr to search through files, I usually get results that show snippets containing the search term. Occasionally though, I get big blocks of text instead of just a single line snippet, ...
1
vote
1answer
38 views

What is the difference between regular and literal expressions in FINDSTR?

What is the difference between /R and /C? FINDSTR [options] [/F:file] [/C:string] [/G:file] [/D:DirList] [/A:color] [/OFF[LINE]] [string(s)] [pathname(s)] /C:string Use string as a literal ...
0
votes
0answers
22 views

findstr prints help instead of result

I have tried these commands, all of which should return a result of some sort from my test file. Insead of getting an actual result, I'm getting a long list of instructions on how to use findstr. ...
0
votes
1answer
440 views

Script to Find Certain words and delete those lines in a file

EDITED THE QUESTION as i am open to different type of solutions unlike just batch previously I am on Windows & some suggested SED etc. So i am OK with these 3rd party standalone exe's using ...
2
votes
3answers
186 views

In windows, is there a way to count the amount of times a string appears in a file

I am currently trying to write a batch script and at this point, I need to find a string, "null", and determine how many times it is shown in the file. I'm downloading an API from a website ...
0
votes
0answers
210 views

How to find which port a service is using by “grep” the result of netstat output on windows 7?

i want to find which port a service is using. i know i can use netstat -anb to show all the protocols and all applications. but how can i filter the result, eg. if the program i'm trying to ...
1
vote
1answer
125 views

Dir and Findstr commands taking a long time to complete in Batch File

dir %DRIVE_NAME%: /S /C /A-D /Q /T:C | findstr ".zip$ .doc$ .xls$ .xpt$ .cpt$ .cpo$ .xlsx$ .pdf$ .dat$ .txt$ .docx$ .csv$" >> file.info I am using above command to list all information in ...
2
votes
2answers
1k views

Use Batch findstr for files with whitespaces

I'm trying to search for a string in a given file. This file can have whitespaces in its name and I'm having trouble with the Batch file. I can easily do this by console getting the correct results: ...
4
votes
1answer
407 views

Vim: How do you use external grep on windows to search for quotation marks?

For some reason I can't for the life of me figure out how to pass single quotation marks to external tools when using vim. For example, I might want to call Vim's external grep to search for the text ...
1
vote
1answer
183 views

Batch : extract some characters of a string

How can I extract alphanumeric characters only from a string? Example : b:lbalbqsd1287/;:!, gives blbalbqsd1287 Is it possible with findstr?
0
votes
1answer
497 views

Searching a string in a file anywhere on PC using Findstr

I have a text (.txt) file located somewhere on my PC that contains a bunch of data, including the following string: Secret Username: ********* Secret Password: ********* How can I find this file ...
1
vote
2answers
2k views

Why does this 'findstr' command not function as expected?

I use the command-line program 'findstr' frequently as I write software. It helps me quickly locate all the files that contain a specific string in a set of subdirectories. It is a lot faster to use ...
0
votes
3answers
453 views

Recursive Batch File

I have a file that looks this: head1,head2,head3,head4,head5,head6 a11,a12,keyA,a14,a15,a16 a21,a22,keyB,a24,a25 a31,a32,keyC,a34 a41,a42,keyB,a44,a44 a51,a52,keyA,a54,a55,a56 ...
1
vote
0answers
554 views

Find vs Findstr results

Per this answer I was attempting to use findstr to locate a string (a name) inside some HL7 log files in a directory. Findstr was getting 0 results, but Find returned plenty. I played around with ...
0
votes
1answer
3k views

How to get the exact match of a string in file using FIND or FINDSTR in dos

I am trying to get the exact match of a path ("\Users\sachin.a.goyal\Desktop\test\") which is there in a file: Biggest.txt: 1 number: name = DMS 3.0 R2 - Deployment Workbook_APAC v4_WMT size = ...
10
votes
3answers
17k views

What's the difference between the find and findstr commands in Windows?

In Windows, what are the differences between the find and findstr commands? Both seem to search for text in files: find C:\> find /? Searches for a text string in a file or files. FIND [/V] ...