Search found 345 matches

by Samir
23 Jul 2017 16:18
Forum: DOS Batch Forum
Topic: DOS Text Editor w/ Keyboard Shortcuts like those in MS-Word (for Windows)?
Replies: 4
Views: 1545

Re: DOS Text Editor w/ Keyboard Shortcuts like those in MS-Word (for Windows)?

What kind of keyboard shortcuts are you looking for? (Although not to get your hopes up, no, I don't know of any command-line editors for DOS other than EDIT.) Just hoping for the basic stuff in MS Word (for Windows): e.g. Ctrl-C=Copy, Ctrl-V=Paste, Shift-^><=Highlight, Ctrl-Z=Undo, Ctrl-Y=Redo/Rep...
by Samir
23 Jul 2017 16:15
Forum: DOS Batch Forum
Topic: Rename Text Files Based On Content ("Line 4" - "Line 6".txt)
Replies: 5
Views: 1462

Re: Rename Text Files Based On Content ("Line 4" - "Line 6".txt)

I have 250,000 text files (Stories of various names) in alphabetized folders. I would like to rename each text file based on the 4th line (Story Title) and the 6th line (Story's Author) of their respected text... If I attempt to do this manually I think I will be doing this for the next 20 years......
by Samir
23 Jul 2017 15:58
Forum: DOS Batch Forum
Topic: how to save response of wget.exe in a variable?
Replies: 15
Views: 3916

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

Samir, after typing TYPE TEST it showed what I wanted C:\Users\Ovidiu>c:\"Program Files (x86)"\GnuWin32\bin\wget.exe --output-document=TEST "http://192.168.1.40/push.php?loadpercentage=%loadpercentage%&totalphysicalmemory=%totalphysicalmemory%&boottime=%boottime%&freephys...
by Samir
23 Jul 2017 15:47
Forum: DOS Batch Forum
Topic: Find All Filenames NOT Containing a String
Replies: 16
Views: 2929

Re: Find All Filenames NOT Containing a String

Without the redirection to nul, the writes to the console are absolutely horrifically slow. Depending on what OS this is being run in, the video driver will also play a big part in how fast text is written to the display. Sometimes running a console 'full screen' (native text) helps, and other time...
by Samir
23 Jul 2017 15:46
Forum: DOS Batch Forum
Topic: Find All Filenames NOT Containing a String
Replies: 16
Views: 2929

Re: Find All Filenames NOT Containing a String

My results were quite interesting. I didn't show any noticeable speed increase/decrease. The file set was 5263 files totaling just over 7MB with file sizes ranging from just over 100 bytes to 6842 bytes. I ran the following commands each took approximately 80 seconds to run. FINDSTR /MVC:"No Da...
by Samir
23 Jul 2017 15:27
Forum: DOS Batch Forum
Topic: Find All Filenames NOT Containing a String
Replies: 16
Views: 2929

Re: Find All Filenames NOT Containing a String

That is a dramatic difference indeed!

I'm going to try some testing on my end and see what type of results I get with the original command. Bear in mind the files are on a file server, so network latency might skew my results slightly.
by Samir
23 Jul 2017 13:33
Forum: DOS Batch Forum
Topic: Find All Filenames NOT Containing a String
Replies: 16
Views: 2929

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: 2929

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: 2929

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: 3916

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: 3916

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: 2929

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: 1135

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: 1325

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: 3916

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?