Search found 86 matches

by Hackoo
07 Jun 2020 10:41
Forum: DOS Batch Forum
Topic: Extract UNIQUE rows ONLY from .txt file.
Replies: 3
Views: 430

Re: Extract UNIQUE rows ONLY from .txt file.

Hi :) You can try like that : @echo off set "InputFile=C:\Users\System-Admin\Desktop\Errors.txt" set "OutputFile=C:\Users\System-Admin\Desktop\DISM_Errors2.txt" Call :RemoveDuplicateEntry %InputFile% %OutputFile% Pause & Exit ::---------------------------------------------------- :RemoveDuplicateEnt...
by Hackoo
24 May 2020 22:25
Forum: DOS Batch Forum
Topic: [SOLVED] Extract data to .txt file and then sort new file.
Replies: 10
Views: 827

Re: Extract data to .txt file and then sort new file.

The help of this command may be put you on the right direction :wink: findstr /? /G:StringsFile Get search string from a file (/ stands for console). You need to put all your strings into a file and use this syntax : findstr /G:"Filter_File.txt" So you can write something like that : @echo off Color...
by Hackoo
23 May 2020 20:09
Forum: DOS Batch Forum
Topic: [SOLVED] Extract data to .txt file and then sort new file.
Replies: 10
Views: 827

Re: Extract data to .txt file and then sort new file.

Hope this what you want :roll: @echo off Title Extract data to a text file and then sort new file Set "LogFile=%userprofile%\Desktop\test.txt" > "%LogFile%" ( @for /f "tokens=*" %%a in ('Driverquery /SI ^| find /I "IsSigned"') do echo %%a @for /f "tokens=*" %%b in ('Driverquery /SI ^| find /I "="') ...
by Hackoo
23 May 2020 19:28
Forum: DOS Batch Forum
Topic: How to rename filenames so only the first letter of words are capitalized?
Replies: 4
Views: 574

Re: How to rename filenames so only the first letter of words are capitalized?

Hi :wink: You can give a try for this batch script using a function in vbscript to capitalize each first letter in the word : @echo off Title Capitalize The First Letter Of The Word by Hackoo 2020 Set Str="meat loaf_i would do anything for love but i won't do that.Mp3"^ #"meat loaf_it's all coming b...
by Hackoo
23 May 2020 15:42
Forum: DOS Batch Forum
Topic: [SOLVED] Extract data to .txt file and then sort new file.
Replies: 10
Views: 827

Re: Extract data to .txt file and then sort new file.

Hi :wink:
Did you mean something like that :?: :roll:

Code: Select all

driverquery /SI | find /I "FALSE" | Sort
by Hackoo
22 Apr 2020 23:34
Forum: DOS Batch Forum
Topic: JREPL: Problem with special characters
Replies: 2
Views: 1518

Re: JREPL: Problem with special characters

Hi :wink: I don't know if this batch can help you in your case ? @echo off :Check Cls & Color 0A Title How to verify if a variable contains a valid filename in Windows Batch echo( Set "my_filename=" Echo Enter filename for this project set /p "my_filename=" echo( echo Before Removing the special cha...
by Hackoo
12 Apr 2020 07:02
Forum: DOS Batch Forum
Topic: Batch to Split TXT Files
Replies: 1
Views: 1364

Re: Batch to Split TXT Files

Hi :wink: I already posted a solution here : [Batch] Split a .txt file into a batch file ; and you can easily edit just one line in this variable : Limit_Line_Counter @echo off Title A batch splitting text Script by Hackoo 2020 Color 0A set "Limit_Line_Counter=200" REM You can modify and edit just t...
by Hackoo
12 Mar 2020 20:07
Forum: DOS Batch Forum
Topic: Get line with highest numerical string
Replies: 6
Views: 2080

Re: Get line with highest numerical string

With your example that you provide, this batch script may be did the trick :idea: @echo off Title Get line with highest numerical string Set "InputFile=%1" If "%~x1" NEQ ".txt" Goto :Help Set "OutPutFile=%~dp0OutPutFile.txt" If Exist "%OutPutFile%" Del "%OutPutFile%" @for /f "tokens=* delims=" %%a i...
by Hackoo
23 Dec 2019 11:28
Forum: DOS Batch Forum
Topic: For /f loop findstr problem The batch script finds nothing !!!
Replies: 2
Views: 1219

Re: For /f loop findstr problem The batch script finds nothing !!!

I didn't test it yet, but, Perhpas you need to add the command Pause if you execute it by double click ? for /f "skip=1 tokens=* usebackq" %%a in (`^""C:\Program Files\7-Zip\7z.exe" h -scrcsha256 "Test.7z" ^| findstr "SHA256 for data"^"`) do echo %%a pause Here is another way to get HASH into a vari...
by Hackoo
21 Dec 2019 04:37
Forum: DOS Batch Forum
Topic: tv
Replies: 4
Views: 1781

Re: tv

Hi :wink: Can you please try my draft version and tell me if this script will work or not on your side ? All your comments are welcomed to improve it :lol: Thank you ! @echo off & color 0A & Mode 95,3 Title Stream IPTV Grabber by Hackoo 2019 echo( echo Type your favorite Channel Name for trying to c...
by Hackoo
19 Dec 2019 01:47
Forum: DOS Batch Forum
Topic: tv
Replies: 4
Views: 1781

Re: tv

I have tested it and it worked like a charm for me :wink: :D
Thank you for this nice share bro :wink:
by Hackoo
05 Nov 2019 18:30
Forum: DOS Batch Forum
Topic: [Solved] How to filter all non-Microsoft services with WMIC and redirect the result to a text file ?
Replies: 6
Views: 5334

Re: [Solved] How to filter all non-Microsoft services with WMIC and redirect the result to a text file ?

Speaking of other scripts ... Pretty much the same thing as HTA in case no MS Office installed: <html><head><title>Non-Microsoft Services</title><meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta http-equiv="x-ua-compatible" content="IE=9"> <style type="text/css"> body {font: ...
by Hackoo
01 Nov 2019 23:13
Forum: DOS Batch Forum
Topic: [Solved] How to filter all non-Microsoft services with WMIC and redirect the result to a text file ?
Replies: 6
Views: 5334

Re: [Solved] How to filter all non-Microsoft services with WMIC and redirect the result to a text file ?

Hi :wink: Here is another version using vbscript in order to export the output results with Excel. Non-Microsoft-Services.vbs Option Explicit Dim objExcel,strComputer,objWMIService Dim State,colServices,x,objService,objWorksheet,objWorkbook ' Create a new and blank spreadsheet: Set objExcel = Create...
by Hackoo
31 Oct 2019 05:18
Forum: DOS Batch Forum
Topic: [Solved] How to filter all non-Microsoft services with WMIC and redirect the result to a text file ?
Replies: 6
Views: 5334

Re: How to filter all non-Microsoft services with WMIC and redirect the result to a text file ?

Sorry My bad i got it , I forgot to add the percent % in the batch file, so with a batch file works 5/5 @echo off WMIC service where "Not PathName like '%%Micro%%' AND Not PathName like '%%Windows%%'" get Name, DisplayName, PathName, Status >"%computername%.txt" Start "" "%computername%.txt" & exit ...
by Hackoo
31 Oct 2019 05:02
Forum: DOS Batch Forum
Topic: [Solved] How to filter all non-Microsoft services with WMIC and redirect the result to a text file ?
Replies: 6
Views: 5334

[Solved] How to filter all non-Microsoft services with WMIC and redirect the result to a text file ?

Hi :wink: WMIC service where "Not PathName like '%Micro%' AND Not PathName like '%Windows%'" get Name, DisplayName, PathName, Status So this command works 5/5 on the console but the problem is when I want to redirect the result to a text file, I get all the instances without any filter? while I see ...