1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

GLOBAL

Discussion in 'Support' started by vefatica, Jun 18, 2012.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    5,507
    Likes Received:
    9
    Is there a way to make GLOBAL report errors **and** continue?
     
    #1
  2. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,531
    Likes Received:
    4
    Doesn't /I do that for you? Assuming that the underlying command is set up for continuation in the face of errors...
     
    #2
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    5,507
    Likes Received:
    9
    No it doesn't. With "/i" the errors are not reported. With "/i" the error is reported and GLOBAL does not continue.
    Code:
    c:\> (global /i /q /h /n echo %_cwd) > v:\file1.txt
     
    c:\> (global /q /h /n echo %_cwd) > v:\file2.txt
    TCC: (Sys) Access is denied.
    "C:\MSOCache"
     
    c:\> dir /k /m v:\file*
    2012-06-18  15:07      1,560,807  file1.txt
    2012-06-18  15:07              97  file2.txt
     
    #3
  4. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,531
    Likes Received:
    4
    I see what you mean. The error occurs when GLOBAL attempts to access a directory, BEFORE the attached command is attempted - the second paragraph describing /I, not the first. It behaved exactly as described. However, the desired behavior is to report errors to STDERR, and continue. I think it is a logical desire, but the documentation at least since 4nt5 describes the current behavior. You need to make the behavior you desire a suggestion for a future version...
     
    #4
  5. vefatica

    Joined:
    May 20, 2008
    Messages:
    5,507
    Likes Received:
    9
    Agreed. But it might be nice to see the error message and let GLOBAL continue. That way, you'll get all you could PLUS some indication of what you didn't get.
     
    #5

Share This Page