Jump to content

Progress Bar for Batch files

I'm looking to add a progress bar that monitors the progress of an external application and then displays it within the command window. Ive come across a few things so far but non of them actualy monitor or display real progress and are just time based. Is there a way to do this or is it just a pipe dream??

(P.S. Hopefully this is in the right topic, if not could someone suggest where to move it to.)

Link to comment
Share on other sites

Link to post
Share on other sites

You can watch how many files from total amount are processed and generate progress based on that.

Link to comment
Share on other sites

Link to post
Share on other sites

The problem with monitoring progress and activity is the more accurate you want it to be, the higher the performance hit your application will take. For example if you were monitoring how many files are being processed, f you have say a bunch of smaller files an one big file somewhere, that one big file will screw things up. If you want more accuracy, you’ll have to do it by total file size and how many bytes were processed, but this requires constant probing.

 

Just find something you feel resembles progress and go with that. Progress meters should be minimally invasive and at the very least should indicate the application didn’t freeze.

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, M.Yurizaki said:

The problem with monitoring progress and activity is the more accurate you want it to be, the higher the performance hit your application will take. For example if you were monitoring how many files are being processed, f you have say a bunch of smaller files an one big file somewhere, that one big file will screw things up. If you want more accuracy, you’ll have to do it by total file size and how many bytes were processed, but this requires constant probing.

 

Just find something you feel resembles progress and go with that. Progress meters should be minimally invasive and at the very least should indicate the application didn’t freeze.

Thanks for the input, I had heard on some other forums that it could be quite taxing for the application. I would like something that would get to 100% as the program finishes which i have yet to find an example of out there on the internet. Would you have any recommendations?

Link to comment
Share on other sites

Link to post
Share on other sites

15 minutes ago, Benajim117 said:

Thanks for the input, I had heard on some other forums that it could be quite taxing for the application. I would like something that would get to 100% as the program finishes which i have yet to find an example of out there on the internet. Would you have any recommendations?

It depends on what your application is doing. The best way to write a progress bar that indicates how many of N numbers you've checked for primality is very different than the best way to write a progress bar that indicates what percentage of textures/objects have been loaded during a games loading screen, for example.

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

33 minutes ago, Benajim117 said:

Thanks for the input, I had heard on some other forums that it could be quite taxing for the application. I would like something that would get to 100% as the program finishes which i have yet to find an example of out there on the internet. Would you have any recommendations?

What exactly is the progress that you're trying to measure?

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

×