GLOBAL

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

  1. vefatica

    vefatica

    Messages:
    4,796
    Is there a way to make GLOBAL report errors **and** continue?
  2. Steve Fabian

    Steve Fabian

    Messages:
    3,407
    Doesn't /I do that for you? Assuming that the underlying command is set up for continuation in the face of errors...
  3. vefatica

    vefatica

    Messages:
    4,796
    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
  4. Steve Fabian

    Steve Fabian

    Messages:
    3,407
    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...
  5. vefatica

    vefatica

    Messages:
    4,796
    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.

Share This Page