PC Review


Reply
Thread Tools Rate Thread

Long duration of performing a command

 
 
Fyodor Koryazhkin
Guest
Posts: n/a
 
      30th Oct 2005

Hi,

During execution of some ciclyc commands such as xcopy or "for" cycle I do
not want to show the user what is going on behind the scene i.e. redirectig
the output of the command to nul or a log file. But from the other side I
would like to notify the user that the program is not stuck, espcially during
long-time consuming "for" cycle.

Is there any possibility to show the user some moving signs such as spinning
slash or moving dots or something like that?

Thank you.


 
Reply With Quote
 
 
 
 
billious
Guest
Posts: n/a
 
      30th Oct 2005

"Fyodor Koryazhkin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> Hi,
>
> During execution of some ciclyc commands such as xcopy or "for" cycle I do
> not want to show the user what is going on behind the scene i.e.
> redirectig the output of the command to nul or a log file. But from the
> other side I would like to notify the user that the program is not stuck,
> espcially during long-time consuming "for" cycle.
>
> Is there any possibility to show the user some moving signs such as
> spinning slash or moving dots or something like that?
>
> Thank you.
>
>


No doubt it could be done - it really depends on what kind of display you
want, how accurate you want the display and the precise details of your
process.

For instance, you could create a new batch (xcopy_process.bat) which did the
XCOPY then deleted a flag file (flag_file.) THEN, in your main procedure you
could try

dir>flag_file
START /min "" xcopy_process
:loop
ping -n 5 127.0.0.1 >nul
if exist flag_file echo at %date %time% XCOPY was continuing&goto loop
echo XCOPY finished...

Or, along the same lines if you were XCOPYing to a new directory

dir>flag_file
START /min "" xcopy_process
:loop
ping -n 5 127.0.0.1 >nul
for /f %%i in ('dir \destinationdirectory^|find "File(s)" ') do set yfc=%%i
if exist flag_file echo at %date %time% %yfc% files copied&goto loop
echo finished copying %yfc% files

Or perhaps if you structure your code appropriately,

set yfc=0
for %%i in (\path\filemask) do call :monitor&xcopy "%%i" \destination
....
:monitor
set /a yfc=1+yfc
if not yfc==10 goto :eof
echo at %date% %time% continuing
set yfc=0


....many ways - depends on your requirements. More info needed.

HTH

....Bill


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Long Long Long Nested If Function sed Microsoft Excel Misc 4 9th Dec 2009 07:44 PM
Deleting block of text takes a long, long, LONG time Nessie Microsoft Word Document Management 1 11th Jun 2009 03:14 PM
Averaging Duration of Time: Duration Longer than 24hr Robin Microsoft Excel Discussion 2 11th Apr 2008 12:55 AM
Fix for long, long, long deleting and copying of files? Hope Windows Vista General Discussion 14 11th Feb 2008 01:12 AM
performing custom command when saving Omar Microsoft Word Document Management 4 18th Jul 2003 02:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:23 PM.