Author Topic: Is there a way to receive errorlevel?  (Read 10713 times)

FUBARinSFO

  • Newbie
  • *
  • Posts: 7
Is there a way to receive errorlevel?
« on: March 08, 2008, 12:15:24 AM »
Hi again:

Evidently TrID doesn't report out errorlevel when it exits.  (errorlevel is always zero irrespective of the detection result).  Therefore it is not very useful in a command file without examining and parsing the output of each detection. 

What would be helpful, at the minimum, if it reported errorlevel not zero when it comes up with an "unknown" file.  It that way a whole drive can be searched for potentially mangled file candidates.

Hope this is helpful.

-- Roy Zider


Mark0

  • Administrator
  • Hero Member
  • *****
  • Posts: 2732
    • Mark0's Home Page
Re: Is there a way to receive errorlevel?
« Reply #1 on: March 08, 2008, 12:26:16 AM »
TrID return an 1 as the ERRORLEVEL if some errors happens: like some needed parameter not specified, the file to analyze not found, if it can't be opened, etc.
I felt that using it with regard to the analysis results would have been too limited to be useful.

Bye!

FUBARinSFO

  • Newbie
  • *
  • Posts: 7
Re: Is there a way to receive errorlevel?
« Reply #2 on: March 08, 2008, 02:10:55 AM »
Well, as I noted above I've got one application where an errorlevel >0 would help me identify lost/mangled files.

Thaks for the prompt reply.

-- Roy Zider

Mark0

  • Administrator
  • Hero Member
  • *****
  • Posts: 2732
    • Mark0's Home Page
Re: Is there a way to receive errorlevel?
« Reply #3 on: March 08, 2008, 02:15:12 AM »
I see. Maybe I can add a different ERRORLEVEL to report that too.
I will keep that in consideration for a next version of TrID.

Thanks for the suggestion,
Bye!

lazna

  • Newbie
  • *
  • Posts: 1
Re: Is there a way to receive errorlevel?
« Reply #4 on: April 08, 2023, 07:35:30 PM »
Missing this feature too. If trid was not done filetype identification (maybe because file is textual), set errorlevel to some specified value, and MENT THIS IN DOCUMENTATION please...

thanks