Answer» Hello all,
I have a few programs written in batch that perform deletions and other functions that take a variable amount of time. I need to find a way to display the progress of the certain functions, so that the user doesn't think that the cmd just locked up. I remember something about a hash command, but have been unsuccessful at locating any documentation on it.
If you need more information please ask, your help is much appreciated.There is no 'hash command'. However maybe what you heard of is people echoing hash symbols (#) to the console as a progres indicator. You can echo them without a CRLF like this
0>nul set /p=#
If you are using a loop you can PUT that LINE at the end or start of the loop so each time around 1 # symbol gets shown.
Thanks for the quick reply. Hmm, this is very interesting. I am currently trying to show the progress of the following function:
Code: [Select]RD /Q /S "%programfiles(x86)%\largefolder"
Is this even possible? I just don't see how I could put that in a loop to change the current outcome. Perhaps someone can tell me a way to achieve this. You cannot show the "progress" of a single command like that. What you could do, I guess, is break it up, that is delete all the files in (and below) that FOLDER one by one, showing a symbol each time. Then remove the empty folder which is done with no delay.
Do this:
Code: [Select]echo Working, please be patient.......
(some other code) Quote from: BatchFileCommand on November 28, 2009, 11:13:05 AM Do this:
Code: [Select]echo Working, please be patient.......
(some other code)
The OP asked for something along the lines of a progressbar...that doesn't even come close, other than the fact that it says the batch is RUNNING...although if it PAUSES at some point in the process, you'd still never know.It's the most sensible. But if you must.
If the amount of files is set you could do something like:
Code: [Select](file action) cls echo [||||| ] (file action) cls echo [||||||| ] (file action) cls echo [|||||||||||] echo. echo Done!
I can't think of anything else. Quote from: BatchFileCommand on December 01, 2009, 06:41:14 PMIt's the most sensible. But if you must.
If the amount of files is set you could do something like:
Code: [Select](file action) cls echo [||||| ] (file action) cls echo [||||||| ] (file action) cls echo [|||||||||||] echo. echo Done!
I can't think of anything else.
That was my first thought when I wanted one too, at one point, but it doesn't work if there is only 1 command.Teracopy which is free, can be started from the command line, called from a batch, etc and has a progress bar with a choice of colours, it can be used for Copy|Move|Delete|Test|Check operations. Can take over Windows copy & move operations (optional).
Docs http://help.codesector.com/TeraCopy
Download http://www.codesector.com/teracopy.php
|