Jump to content

simple batch file command. Open CMD, ping ?.?.?.? -t stay open.

Joe Brainer

What's the input and is it possible to make it resize itself too? I don't know much about batch files. All I do know is how to make it look like internet explorer and set it to either shut down the pc or open the disk drive and such to really irritate your teacher or pull a prank on a friend. 

Link to comment
Share on other sites

Link to post
Share on other sites

Batch files are quite literally just the commands that you would normally enter.

[Out-of-date] Want to learn how to make your own custom Windows 10 image?

 

Desktop: AMD R9 3900X | ASUS ROG Strix X570-F | Radeon RX 5700 XT | EVGA GTX 1080 SC | 32GB Trident Z Neo 3600MHz | 1TB 970 EVO | 256GB 840 EVO | 960GB Corsair Force LE | EVGA G2 850W | Phanteks P400S

Laptop: Intel M-5Y10c | Intel HD Graphics | 8GB RAM | 250GB Micron SSD | Asus UX305FA

Server 01: Intel Xeon D 1541 | ASRock Rack D1541D4I-2L2T | 32GB Hynix ECC DDR4 | 4x8TB Western Digital HDDs | 32TB Raw 16TB Usable

Server 02: Intel i7 7700K | Gigabye Z170N Gaming5 | 16GB Trident Z 3200MHz

Link to comment
Share on other sites

Link to post
Share on other sites

 

6 minutes ago, DeadEyePsycho said:

Batch files are quite literally just the commands that you would normally enter.

And those commands that are needed are??

Want to know which mobo to get?

Spoiler

Choose whatever you need. Any more, you're wasting your money. Any less, and you don't get the features you need.

 

Only you know what you need to do with your computer, so nobody's really qualified to answer this question except for you.

 

chEcK iNsidE sPoilEr fOr a tREat!

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, bob51zhang said:

 

And those commands that are needed are??

Really? At least give an effort to learn the commands.

c:\windows\system32\cmd.exe
ping -t x.x.x.x

What do you mean by resize? Resize what?

[Out-of-date] Want to learn how to make your own custom Windows 10 image?

 

Desktop: AMD R9 3900X | ASUS ROG Strix X570-F | Radeon RX 5700 XT | EVGA GTX 1080 SC | 32GB Trident Z Neo 3600MHz | 1TB 970 EVO | 256GB 840 EVO | 960GB Corsair Force LE | EVGA G2 850W | Phanteks P400S

Laptop: Intel M-5Y10c | Intel HD Graphics | 8GB RAM | 250GB Micron SSD | Asus UX305FA

Server 01: Intel Xeon D 1541 | ASRock Rack D1541D4I-2L2T | 32GB Hynix ECC DDR4 | 4x8TB Western Digital HDDs | 32TB Raw 16TB Usable

Server 02: Intel i7 7700K | Gigabye Z170N Gaming5 | 16GB Trident Z 3200MHz

Link to comment
Share on other sites

Link to post
Share on other sites

You can change console size with MODE  columns,lines eg.

MODE 80,25

will make your console 80 characters width and 25 character height, but there is no buffer (no scrolling ability)

then you can just ping something with PING command

PING www.google.com

and to not close your console after script ends you can use PAUSE, it will wait until you press any key.

 

Alse, if oyu type @ before command in your bath file, it will not show up, just the result of the command will be printed. If you want to hide all commands you execute, you can start file with:

@echo off

echo off turns off prompts and @ makes this one not show.

 

Edit: actually -t parameter will make ping running and pinging server continuously, so the script will end only with eg. CTRL-C, PAUSE is not needed then.

Link to comment
Share on other sites

Link to post
Share on other sites

19 minutes ago, Techkalakosis said:

What's the input and is it possible to make it resize itself too? I don't know much about batch files. All I do know is how to make it look like internet explorer and set it to either shut down the pc or open the disk drive and such to really irritate your teacher or pull a prank on a friend. 

Not sure if this application still works; hasn't been updated since Win2000.

 

https://www.grc.com/WIZMO/WIZMO.HTM

Want to know which mobo to get?

Spoiler

Choose whatever you need. Any more, you're wasting your money. Any less, and you don't get the features you need.

 

Only you know what you need to do with your computer, so nobody's really qualified to answer this question except for you.

 

chEcK iNsidE sPoilEr fOr a tREat!

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Mr_KoKa said:

You can change console size with MODE  columns,lines eg.


MODE 80,25

will make your console 80 characters width and 25 character height, but there is no buffer (no scrolling ability)

then you can just ping something with PING command


PING www.google.com

and to not close your console after script ends you can use PAUSE, it will wait until you press any key.

 

Alse, if oyu type @ before command in your bath file, it will not show up, just the result of the command will be printed. If you want to hide all commands you execute, you can start file with:


@echo off

echo off turns off prompts and @ makes this one not show.

awesome, getting closer though. Now it repeats the command a bit too quick and it's blurry. whether I use -t or not. Is there a comannd to make it run only one command?
I manually do exactly this. Google dns, good reliable base reading so I know if it's game server, their end. Or my end lag. 
Winkey + R > cmd > /ping 8.8.4.4 -t > enter move to corner of screen after making the window smaller. 

Link to comment
Share on other sites

Link to post
Share on other sites

You mean you want to ping server less often? If so, you probably would need make a loop to perform one ping and then invoke sleep command to wait between pings.

@echo off
:LOOP
ping www.google.pl -n 1
timeout /T 5 > nul
GOTO LOOP

timeout would normally display countdown, but when you route the output (eg. to null) it won't display anything.

 

I don't know what you mean by blurry, maybe your window is too small and it breaks result?

To adjust command window to your needs you could create shortcut to your bat file and then right click it, pick properties, and you can set whatever you want from font size to window size, so you can set more columns and lines but make font smaller which will reduce window size, but won't affect result formatting.

 

Edit: I made mistake, it is nul not null, null will create file named null.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×