Search found 384 matches

by Samir
23 Jul 2017 13:33
Forum: DOS Batch Forum
Topic: Find All Filenames NOT Containing a String
Replies: 16
Views: 13889

Re: Find All Filenames NOT Containing a String

I should clarify what I meant by "matching line" - any line that would be printed by FINDSTR if the /M option is not used. So if the /V option is used, then a "matching line" is any line that does not match the search string. Combine the /M option with /V, and the scan terminate...
by Samir
23 Jul 2017 12:48
Forum: DOS Batch Forum
Topic: Find All Filenames NOT Containing a String
Replies: 16
Views: 13889

Re: Find All Filenames NOT Containing a String

Removed option /M, it doesn't make sense anymore. Actually the /M option can still serve a purpose. Without /M, the entire file must be scanned. With /M, the scan will end as soon as the first matching line is found. This can have a significant impact if the file is very large. Of course the entire...
by Samir
19 Jul 2017 16:21
Forum: DOS Batch Forum
Topic: Find All Filenames NOT Containing a String
Replies: 16
Views: 13889

Re: Find All Filenames NOT Containing a String

(This seems to come from the /V still returning the rest of the contents of the file, so something is still 'found'.) Hmm good point. untested for %%i in (BAT*.RPT) do >nul FINDSTR /MC:"No Data To Report" "%%~i" || echo "%%i" Steffen It worked! But after looking at the...
by Samir
19 Jul 2017 15:08
Forum: DOS Batch Forum
Topic: how to save response of wget.exe in a variable?
Replies: 15
Views: 17036

Re: how to save response of wget.exe in a variable?

Hmm...there's a lot going on here. I think the batch part might be working right, but the wget is not. Try just running the following commands and let me know what you get: c:\"Program Files (x86)"\GnuWin32\bin\wget.exe --output-document=TEST "http://192.168.1.40/push.php?loadpercenta...
by Samir
19 Jul 2017 09:52
Forum: DOS Batch Forum
Topic: how to save response of wget.exe in a variable?
Replies: 15
Views: 17036

Re: how to save response of wget.exe in a variable?

Oops! Sorry! I asked the wrong question. :oops:

What does the output of

Code: Select all

http://192.168.1.40/push.php?loadpercentage=%loadpercentage%&totalphysicalmemory=%totalphysicalmemory%&boottime=%boottime%&freephysicalmemory=%freephysicalmemory%
look like?
by Samir
19 Jul 2017 09:51
Forum: DOS Batch Forum
Topic: Find All Filenames NOT Containing a String
Replies: 16
Views: 13889

Re: Find All Filenames NOT Containing a String

Actually you have to apply two more options. First you need /c otherwise it searches the four words separately. Then you need /v to invert the searching. FINDSTR /MVC:"No Data To Report" BAT*.RPT Steffen I played with these earlier and they would still return files that had the strings vs...
by Samir
19 Jul 2017 06:33
Forum: DOS Batch Forum
Topic: How to process files without string in filename?
Replies: 3
Views: 4342

Re: How to process files without string in filename?

If you know the output filename, you can use IF NOT EXIST path\file to check if the file already exists before even running the ffmpeg part of the process. I built an N-scaleable multi-computer network-based mp3 encoder batch file like that back in the day when real-time encoding was unheard of. Usi...
by Samir
19 Jul 2017 06:19
Forum: DOS Batch Forum
Topic: Check day and if day = .. start file
Replies: 6
Views: 6433

Re: Check day and if day = .. start file

You could simplify the entire process by just using the built-in WMIC.exe. For /F EOL^=D %%A In ('WMIC Path Win32_LocalTime Get DayOfWeek' ) Do If %%A Equ 1 Start "" "Your Program.exe" You just need to verify that Monday is allocated 1 in your local output, it is here despite it...
by Samir
19 Jul 2017 06:09
Forum: DOS Batch Forum
Topic: how to save response of wget.exe in a variable?
Replies: 15
Views: 17036

Re: how to save response of wget.exe in a variable?

What does the output of c:\"Program Files (x86)"\GnuWin32\bin\wget.exe "http://192.168.1.40/push.php?loadpercentage=%loadpercentage%&totalphysicalmemory=%totalphysicalmemory%&boottime=%boottime%&freephysicalmemory=%freephysicalmemory%" look like?
by Samir
19 Jul 2017 06:05
Forum: DOS Batch Forum
Topic: Find All Filenames NOT Containing a String
Replies: 16
Views: 13889

Find All Filenames NOT Containing a String

My brain is failing me this morning. I have a set of filenames like this: BAT000001480.RPT BAT000001481.RPT BAT000001482.RPT BAT000001483.RPT BAT000001484.RPT BAT000001485.RPT Inside most of these files is the following string along with other strings: No Data To Report I want to find all the filena...
by Samir
04 Jun 2017 08:19
Forum: DOS Batch Forum
Topic: Using Findstr to Find Unique Data Between 2 Files
Replies: 2
Views: 5577

Re: Using Findstr to Find Unique Data Between 2 Files

Thank you for the link! Some great reading on the same subject. 8)
by Samir
25 May 2017 16:19
Forum: DOS Batch Forum
Topic: Using Findstr to Find Unique Data Between 2 Files
Replies: 2
Views: 5577

Using Findstr to Find Unique Data Between 2 Files

I tried to search for a thread that deals with this before, but the search didn't give me any results. I'm sure there's a better way to do this, and hence why I'm posting. If you had two files and wanted to know what the unique data was between them, FC was an easy way achieve this, but the data had...
by Samir
14 Apr 2017 16:31
Forum: DOS Batch Forum
Topic: What is Your Greatest Batch?
Replies: 9
Views: 7742

Re: What is Your Greatest Batch?

ShadowThief wrote:...it ran daily and based on the day, saved anywhere from 2 to 4 hours.
That's some pretty cool time savings (and probably money) for a batch file. 8)
by Samir
13 Apr 2017 14:39
Forum: DOS Batch Forum
Topic: Help with making a backup batch file
Replies: 2
Views: 4162

Re: Help with making a backup batch file

So basically you need to research those commands that allow user input. I believe set /p is one of them.

Work on your batch and post it here and we'll help debug it.
by Samir
13 Apr 2017 14:38
Forum: DOS Batch Forum
Topic: What is Your Greatest Batch?
Replies: 9
Views: 7742

Re: What is Your Greatest Batch?

Me first. :mrgreen: Probably my greatest batch takes 30 minutes of manual work and finishes it in under 10 seconds.