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

How To Show Simple Loading Effect In CMD: Although 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 blinking screen, while we use Cls Command each time in the iteration. So in this Post, I Am gonna teach you how to show simple loading effect in cmd (no cls command).

Simple loading without CLS command


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

Loading effect

The Question was asked to #TheBATeam on our Facebook page by someone, who is too 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.

The answer to requested Question is as follows:
In this Problem’s Solution.

I’m gonna use the Unique property of ‘SET’ command in batch programming, and few of the Handle options, which allow us to redirect the input or output Handles of a certain command in the Batch Programming.

Try out the following code:

@echo off
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

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


Download Link

Also Read:  Print Factorial of a Number | By Kvc

Next Post

Previous Post

Leave a Reply

© 2020 TheBATeam

Theme by Anders Norén