Suppress an error message box on running UC from command line

Suppress an error message box on running UC from command line

74
Advanced UserAdvanced User
74

    Mar 11, 2017#1

    Greetings I have a batch file of 600+ lines of UltraCompare command line syntax. It used to work beautifully, but recently when I run it, if a file is not found a message box appears and tells me "is not a valid path". After looking into it I found the file didn't exist. This is an event that will happen because I have no control of the personnel providing the source files to me.

    Before the command line would just skip through the error and in the output report, list the file found and not write the file missing. Then move on to the next set of files. The comparison was great because there was no user interaction.

    Now there's this constant message box they see.

    Is there anyway to suppress the error? Or have it logged so the message box doesn't appear? Possibly make it run like it used to?

    Below is a few lines of my code. Thank you so much for looking at this. Max

    Code: Select all

    uc -i -lt -B -b -t "E:\Output\JL1-D77BH2-24-01-93.txt" "E:\Output\JL1-D77BH2-50-33.txt" -op "E:\Reports\23_CompareKey_Results.txt"
    uc -i -lt -B -b -t "E:\Output\JL1-D77BH2-20-05-93.txt" "E:\Output\JL1-D77BH2-130-93.txt" -op "E:\Reports\23_CompareKey_Results.txt"
    start "UltraEdit the Model offline" "%ProgramFiles(x86)%\IDM Computer Solutions\UEStudio\UEStudio.exe" /foi "E:\Reports\23_CompareKey_Results.txt" /s,e"C:\Scripts\CleanupCompareResults.js"
    uc -i -lt -B -b -t "E:\Output\JL1-D77BH2-48-01-01.txt" "E:\Output\JL1-D77BH2-07-A3.txt" -op "E:\Reports\32_CompareKey_Results.txt"
    uc -i -lt -B -b -t "E:\Output\JL1-D77BH2-48-762-01.txt" "E:\Output\JL1-D77BH2-80-B1.txt" -op "E:\Reports\32_CompareKey_Results.txt"
    start "UltraEdit the Model offline" "%ProgramFiles(x86)%\IDM Computer Solutions\UEStudio\UEStudio.exe" /foi "E:\Reports\32_CompareKey_Results.txt" /s,e"C:\Scripts\CleanupCompareResults.js"
    

    6,603548
    Grand MasterGrand Master
    6,603548

      Mar 11, 2017#2

      I suggest to check already in batch file if the files to compare exist before starting UltraCompare.

      Here are two of multiple methods how to code the file existing checks before starting UltraCompare and running UEStudio.

      Code: Select all

      @echo on
      if exist "E:\Output\JL1-D77BH2-24-01-93.txt" ^
        if exist "E:\Output\JL1-D77BH2-50-33.txt" ^
          uc -i -lt -B -b -t "E:\Output\JL1-D77BH2-24-01-93.txt" "E:\Output\JL1-D77BH2-50-33.txt" -op "E:\Reports\23_CompareKey_Results.txt"
      if exist "E:\Output\JL1-D77BH2-20-05-93.txt" ^
        if exist "E:\Output\JL1-D77BH2-130-93.txt" ^
          uc -i -lt -B -b -t "E:\Output\JL1-D77BH2-20-05-93.txt" "E:\Output\JL1-D77BH2-130-93.txt" -op "E:\Reports\23_CompareKey_Results.txt"
      if exist "E:\Reports\23_CompareKey_Results.txt" ^
        start "UltraEdit the Model offline" "%ProgramFiles(x86)%\IDM Computer Solutions\UEStudio\UEStudio.exe" /foi "E:\Reports\23_CompareKey_Results.txt" /s,e="C:\Scripts\CleanupCompareResults.js"
      
      if exist "E:\Output\JL1-D77BH2-48-01-01.txt" (
        if exist "E:\Output\JL1-D77BH2-07-A3.txt" (
          uc -i -lt -B -b -t "E:\Output\JL1-D77BH2-48-01-01.txt" "E:\Output\JL1-D77BH2-07-A3.txt" -op "E:\Reports\32_CompareKey_Results.txt"
        )
      )
      if exist "E:\Output\JL1-D77BH2-48-762-01.txt" (
        if exist "E:\Output\JL1-D77BH2-80-B1.txt" (
          uc -i -lt -B -b -t "E:\Output\JL1-D77BH2-48-762-01.txt" "E:\Output\JL1-D77BH2-80-B1.txt" -op "E:\Reports\32_CompareKey_Results.txt"
        )
      )
      if exist "E:\Reports\32_CompareKey_Results.txt" (
        start "UltraEdit the Model offline" "%ProgramFiles(x86)%\IDM Computer Solutions\UEStudio\UEStudio.exe" /foi "E:\Reports\32_CompareKey_Results.txt" /s,e="C:\Scripts\CleanupCompareResults.js"
      )
      
      Further I suggest to send by email an enhancement request to IDM support for one more command line option to suppress any error message. Something like -inul or -y as for example WinRAR has to suppress error messages on running from command line from within a batch file. Well, WinRAR has also the option -ilog[name] to write error messages into a log file.
      Best regards from an UC/UE/UES for Windows user from Austria

      74
      Advanced UserAdvanced User
      74

        Mar 11, 2017#3

        Thank you. I had thought about that but was hoping to avoid it since it worked before. I appreciate your looking at this.

        Max