China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-03 12:02
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Ask, how to make a progress bar that can also be synchronized with the program's operation View 1,583 Replies 11
Original Poster Posted 2006-12-13 11:45 ·  中国 山西 太原 电信
初级用户
Credits 56
Posts 22
Joined 2006-12-13 10:54
19-year member
UID 73399
Gender Male
Status Offline
As the title says
Floor 2 Posted 2006-12-13 12:05 ·  中国 北京 朝阳区 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
Progress bar related content please refer to the following posts~:)

Batch processing emotional progress bar
http://www.cn-dos.net/forum/viewthread.php?tid=25345&fpage=1&highlight=progress

How to use "\-/" to represent a progress state
http://www.cn-dos.net/forum/viewthread.php?tid=24347&fpage=1&highlight=progress

A question about progress bar delay
http://www.cn-dos.net/forum/viewthread.php?tid=25386&fpage=1&highlight=progress

How to simulate the display effect of listing paths like Rising Antivirus scanning in batch processing?
http://www.cn-dos.net/forum/viewthread.php?tid=23793&fpage=1&highlight=progress bar

Trouble caused by a GIF file
http://www.cn-dos.net/forum/viewthread.php?tid=20669&fpage=1&highlight=from+a+GIF+file+caused+trouble

[ Last edited by redtek on 2006-12-12 at 11:09 PM ]
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 3 Posted 2006-12-14 00:01 ·  中国 山西 太原 电信
初级用户
Credits 56
Posts 22
Joined 2006-12-13 10:54
19-year member
UID 73399
Gender Male
Status Offline
All said that it can't be synchronized with the program progress! It's boring, the implementation is too simple
Floor 4 Posted 2006-12-14 00:07 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
20-year member
UID 44210
Status Offline
In batch processing, basically to achieve the synchronization between the progress bar and the program progress is...
Floor 5 Posted 2007-02-08 06:04 ·  中国 广东 惠州 电信
新手上路
Credits 6
Posts 3
Joined 2007-01-04 14:30
19-year member
UID 75439
Gender Male
Status Offline
What I want is: First, start executing xcopy to copy files (without displaying copy information) and just add "File data processing..." Then start the progress bar at this time. That is to say, the progress bar starts during the program execution, and this progress bar is "blurred". I just want this effect, and don't need precise synchronization.
Floor 6 Posted 2007-02-08 06:16 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
20-year member
UID 44210
Status Offline
There is a percentage progress with the CMD command copy/z.
Floor 7 Posted 2007-02-08 06:26 ·  中国 江苏 苏州 联通
银牌会员
★★★
Credits 1,181
Posts 533
Joined 2006-08-14 12:54
19-year member
UID 60484
Status Offline
Open two processes with one batch, one runs, and the other monitors and displays relevant information?
Floor 8 Posted 2007-02-08 06:40 ·  中国 广东 惠州 电信
新手上路
Credits 6
Posts 3
Joined 2007-01-04 14:30
19-year member
UID 75439
Gender Male
Status Offline
Actually it is like this:
xcopy.exe performs file copying
xcopy /s /q d:\game e:\netgame
When the above program is executed, a progress bar starts to be displayed. No need for precise statistics, just display the progress status.
(Because after adding the parameter q to xcopy, there is no display information. Then it depends on the progress bar to display (infinite delay)
Floor 9 Posted 2007-02-08 06:43 ·  中国 北京 朝阳区 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
The method of brother zh159 on floor 6 is wonderful ~ :)

If brother blueglede must challenge this kind of DIY thing, it's not impossible ~ :)

) Split the large file to be XCOPYed using the file splitting code written by brother LXMXN (search in the forum), and use it to split the large file into 100 parts!

) Then use a FOR loop to display a progress process for each COPY of one part. When the 100th part is copied, it will naturally show 100% progress.
  This is a relatively precise method ~ :)

  By the way, after all 100 parts are copied, copy /B to splice them... (restore)

  In this way, brother progress bar can freely customize various progress bars ~ :)

  But, splitting a large file takes time and also needs to occupy the same amount of file size space. Then each time a sub-block is copied, the batch code for displaying the progress bar is called once. When all 100 blocks are copied, it is estimated that brother needs to copy a 100MB large file, and it will take 2-3 times the total time of the ordinary XCOPY, haha...

[ Last edited by redtek on 2007-2-7 at 05:49 PM ]
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 10 Posted 2007-02-08 08:45 ·  中国 吉林 四平 联通
高级用户
★★★
Credits 859
Posts 413
Joined 2006-08-14 21:55
19-year member
UID 60532
Status Offline
It seems not easy to put brother r's suggestion into practice, right?
Floor 11 Posted 2007-02-09 14:32 ·  中国 广东 惠州 电信
新手上路
Credits 6
Posts 3
Joined 2007-01-04 14:30
19-year member
UID 75439
Gender Male
Status Offline
In fact, it is okay to simply use a scroll bar to replace the information of copying files by xcopy.exe. There is no need, and it is very difficult to achieve - precise synchronization.
Floor 12 Posted 2007-02-17 03:31 ·  中国 安徽 合肥 电信
初级用户
Credits 29
Posts 15
Joined 2007-02-17 00:05
19-year member
UID 79653
Gender Male
Status Offline
Forum Jump: