Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: INSERT FLASHING OR REPEATING LINE IN FILE  (Read 3562 times)

0 Members and 1 Guest are viewing this topic.

Toyman

    Topic Starter


    Newbie

    • Experience: Experienced
    • OS: Windows 10
    INSERT FLASHING OR REPEATING LINE IN FILE
    « on: October 24, 2017, 10:00:00 AM »
    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


    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: INSERT FLASHING OR REPEATING LINE IN FILE
    « Reply #1 on: October 27, 2017, 06:09:26 AM »
    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.  8)
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    Toyman

      Topic Starter


      Newbie

      • Experience: Experienced
      • OS: Windows 10
      Re: INSERT FLASHING OR REPEATING LINE IN FILE
      « Reply #2 on: November 03, 2017, 09:11:54 AM »
      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

      DaveLembke



        Sage
      • Thanked: 662
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: INSERT FLASHING OR REPEATING LINE IN FILE
      « Reply #3 on: November 03, 2017, 06:37:26 PM »
      Wanted to say ... "Welcome Back Sidewinder" ... been a while since I saw you here  8)

      patio

      • Moderator


      • Genius
      • Maud' Dib
      • Thanked: 1769
        • Yes
      • Experience: Beginner
      • OS: Windows 7
      Re: INSERT FLASHING OR REPEATING LINE IN FILE
      « Reply #4 on: November 03, 2017, 06:43:07 PM »
      Been a while...i agree   Welcome back
      " Anyone who goes to a psychiatrist should have his head examined. "