The tag has no wiki summary.

learn more… | top users | synonyms

-2
votes
0answers
48 views

*.bat script : find in “xxx” folder today files that containing “yyy” string inside and copy thoes files to “zzz” folder [on hold]

Please script in batch : find in "xxx" folder a today files that containing "yyy" string inside of them and then copy those files to "zzz" folder i guess it can be done with forfiles and findstr ...
0
votes
1answer
9 views

find certain item of a file by using command line tool in windows 7

recently I used findstr "ItemThatIsBeeingSearchedFor" C:\Windows\System32\drivers\etc\hosts > J:\documents\HostsFile\ResultOfSearch.txt in order to output a certain entry of the hosts file into ...
2
votes
1answer
36 views

Get URL from HTML file using FindStr

I'd like to preface this by saying that I'm very new to the command prompt and I've been only using it for some WGET and YOUTUBE-DL, and that I'm on a Windows 8 PC. I'd like to get a bunch of links ...
0
votes
0answers
31 views

Most efficient command to search the first line of many files (windows)

I am new to the windows ecosystem. I have been tasked with writing a program that will search several 10's (maybe even 100's) of thousands of files for a particular string. The string that must be ...
2
votes
1answer
25 views

Delete scheduled taskname containing space

I want to delete scheduled tasks that start with "Adobe Acrobat" eg "Adobe Acrobat 123","Adobe Acrobat 456","Adobe Acrobat 789" schtasks /Delete /TN Adobe* /F This command fails to find any tasks ...
0
votes
1answer
30 views

Use findstr to output characters 1-13

I have the code: findstr /B ^121.*.CATDrawing catdrawing.txt How to show from the first to thirteenth character? 1220112000001A.CATDrawing -> 1220112000001
0
votes
2answers
34 views

Windows 7 cmd Findstr for 2 strings a AND b(not OR)

I want to know if there is a way to use findstr to find only those lines in a text file which have both strings a and b. The following: findstr "aaa bbb" test.txt will find all lines with aaa or bbb. ...
0
votes
0answers
73 views

Find and delete characters special in text file batch file

Example: three text files: 1.txt contents store is: 7.1M 2.txt is 72M 3.txt is 7.21M I would use batch file to scan these three text files and output: 1.txt is 7 2.txt is 72 3.txt is 7 Thank ...
0
votes
1answer
58 views

Batch to retrieve TFS version erroring in FOR /F where TFS attempts to PIPE to findstr

I have this partial batch, but it gives me an error (On 64 bit installations) SETLOCAL EnableDelayedExpansion REM Figure out what ProgramFiles Root we run the command SET ...
0
votes
2answers
102 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
20 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
71 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
1k 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
573 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 ...
1
vote
1answer
232 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
2k 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: ...
5
votes
1answer
492 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
196 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
743 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
502 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
666 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
4k 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 = ...
11
votes
3answers
21k 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] ...