Search found 92 matches

by Hackoo
08 Jun 2021 02:50
Forum: DOS Batch Forum
Topic: [Solved] How to delete a file with zero byte created accidentally with name "Call" on Windows ?
Replies: 2
Views: 457

[Solved] How to delete a file with zero byte created accidentally with name "Call" on Windows ?

How to delete a file with zero byte created accidentally with name "Call" ? I'm facing with this issue that i couldn't figure it out until now ? I tried with command Del but no chance. @echo off set "targetdir=C:\FolderDir" for /f "delims=" %%a in ('dir/s/b/a-d "%targetdir%\*.*"') do ( if %%~Za equ ...
by Hackoo
01 Jun 2021 10:44
Forum: DOS Batch Forum
Topic: Animated screen in Batch
Replies: 4
Views: 550

Re: Animated screen in Batch

Hi ;) I think you should add a counter and increment it and stop the loop when you want ! Here is an example how to use a counter inside your animation loop @echo off & color 0A & Mode 85,39 Title Animation set /a cnt=0 :Anim cls echo( echo `sss+- `:/:` echo `. :sssss+` .sssss+. echo oss/` /ssssss+`...
by Hackoo
27 Apr 2021 06:14
Forum: DOS Batch Forum
Topic: Taskkill %0
Replies: 6
Views: 1141

Re: Taskkill %0

Hi :wink: You can also use the WMIC to "kill your self" oh no :D :lol: I mean killing your batch file :lol: @echo off Title BATCH SELF KILLING :MAIN CLS Set "ME=%~0" Set "ME=%ME:\=\\%" REM Just To show what can be the result wmic PROCESS where "CommandLine Like '%%%ME%%%' And Name Like '%%cmd.exe%%'...
by Hackoo
24 Apr 2021 03:39
Forum: DOS Batch Forum
Topic: Start batch files at startup...
Replies: 2
Views: 900

Re: Start batch files at startup...

Hi :) Just give a try for this batch file : @echo off Title Create a shortcut on Startup Folder of my batch file using Powershell ::-----------------------Calling our Sub-Routine Create_Shortcut_Startup ------------------------------- Call :Create_Shortcut_Startup ::-------------------------------Be...
by Hackoo
05 Apr 2021 10:57
Forum: DOS Batch Forum
Topic: tv
Replies: 9
Views: 16743

Re: tv

Hi :wink: I found a nice and a good resource to get a large IPTV links from this Github IPTV So, i created a Powershell script to get a list of all available channels in JSON format and parsing it to get and build our m3u file :P :wink: Github-IPTV-Parser.ps1 cls #Powershell Script Created by Hackoo...
by Hackoo
02 Apr 2021 14:12
Forum: DOS Batch Forum
Topic: tv
Replies: 9
Views: 16743

Re: tv

Sorry to bump an old thread, but I've used this batch script for a while and the site this goes off of has updated and ever since the batch script only gives blank notepad results. Is there any plans to update this script or a way that I can edit something on mine? Thanks! Thank you for the notific...
by Hackoo
07 Jun 2020 10:41
Forum: DOS Batch Forum
Topic: Extract UNIQUE rows ONLY from .txt file.
Replies: 4
Views: 2462

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

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

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

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

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

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

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: 12
Views: 5740

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

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...