An official Batch Programming blog! To Solve the daily problems with windows and fixing them with little notepad scripts. Unlock the Hidden Secrets of Windows, Learn to crack Software via CMD & Make your own Programming tools. Understand to Manipulate your PC via CMD.

How to Show Simple Loading effect in cmd | Beginners

We all know showing a loading kind of effect on cmd console is such a dirty task to do. Because we need to loop through a code unnecessarily and clear the console each time a loading effect occurs on the console.

It makes our program bulky, as well as making a blinking screen, while we use the CLS command each time in the iteration. So in this post, I am going to show you a cmd trick to show a simple loading effect in cmd (without the CLS command).

HOW TO SHOW SIMPLE LOADING EFFECT IN CMD | BEGINNERS
Simple loading without CLS command

HOW TO SHOW SIMPLE LOADING EFFECT IN CMD (WITH NO CLS COMMAND)

So, how were they able to do that loading effect? Here, in this post, we are going to know about the method of Microsoft or some similar method that Microsoft might have used in their old programs.

HOW TO SHOW SIMPLE LOADING EFFECT IN CMD | BEGINNERS
Loading effect

The question was asked to #TheBATeam on our Facebook page by someone, who is much curious to know things as we are. So, here we are replying to his answer as well as helping someone else, who would have the same or similar question in their mind.

Now, let’s get on to solving the problem! I’m going to use the unique property of ‘SET’ command in batch programming. And a few of the Handle options, which allow us to redirect the input or output Handles of a certain command in Batch.

Try out the following code:

@echo off
cls
echo.
echo.
set /p ".=Loading" <nul
timeout /t "1" >nul
set /p ".=." <nul
timeout /t "1" >nul
set /p ".=." <nul
timeout /t "1" >nul
set /p ".=." <nul
timeout /t "1" >nul
set /p ".=." <nul
timeout /t "1" >nul
set /p ".=(Done)" <nul
pause
HASH Code - For Verification - (SHA-256)
fa2e24c48d156c9e6a2557d2ef2bf462f80686a9d0a2eb51ab7e6af8680c2f86

From The Editors Desk

We hope you enjoyed this solution to a community requested problem! If you have questions, contact us below in the comments, or join our Whatsapp, Telegram or Discord!

Keep learning, keep sharing….
Be happy, spread happiness…

TheBATeam

Download Link

Also Read:  Lock Folder/File with CMD | Protecting my Data | Locker 3.0

Next Post

Previous Post

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2020 TheBATeam

Terms & Conditions   /   Privacy Policy   /   Why Register?

Theme by Anders Norén