1.

Solve : INSERT FLASHING OR REPEATING LINE IN FILE?

Answer»

I'm batching a series of 'Call' commands to back up critical files to multiple devices (external drives, etc) and would like to display a line saying ". . . working . . ." that repeats or flashes until a called program completes.  My users complain that because the screen shows nothing during lengthy file-backups, they're not SURE anything's happening.

Using FOR has been unsuccessful I'm guessing because my use of syntax/switches is wrong.

Thoughts? 

Toyman

Just a demo you may find helpful.

Code: [Select]echo off
setlocal enabledelayedexpansion

for /f %%a in ('copy /z "%~dpf0" nul') do set "cr=%%a"
set "busy=|/-\"
set /a n=0

::spinner
  for /l %%i in (0,1,10) do (
    set /a "n=%%i%%4"
    for /l %%n in (!n! 1 !n!) do set /p "=In Progress !busy:~%%n,1! !cr!"<nul:
    ping -n 2 127.0.0.1 >nul:
)

Good luck.  Thanks, Sidewinder.

The segment (your inserted code) had to TIME out before CONTINUING to the 'call' command.  Since the called program runs in the background, I'm not there yet.  Still have the blank screen.

I think invoking ANSI.SYS and piping the ESC code to it from the Call line might work.  ESC[5m = blinking text.

I'm not having luck with that - yet.  But your answer PROMPTED a search in the FORUM where I found a section about using ANSI.SYS.  My education continues.

I appreciate your effort.

Toyman
Wanted to say ... "Welcome Back Sidewinder" ... been a while since I saw you here  Been a while...i agree   Welcome back



Discussion

No Comment Found