Forum Replies Created

Viewing 15 posts - 226 through 240 (of 686 total)

  • Reply To: Parse txt file

    Can't seem to get original file to process gets errors listed above.. sample file will process.

     

    Any thoughts or suggestions?

     

    Thanks again

  • Reply To: Parse txt file

    ZZartin, after I created my sample file that I attached, and ran your sample script against it worked, and dumped the tags out like expected.

    The file contains CRLF for each...

  • Reply To: Parse txt file

    Sorry Jeff,    --- Thanks ZZartin for sample... I did include error messages from run

    To you both sorry for not including a sample file to work from.. This sample has...

    Attachments:
    You must be logged in to view attached files.
  • Reply To: Parse txt file

    Exception calling "Substring" with "2" argument(s): "Length cannot be less than zero.

    Parameter name: length"

    At C:\PowerShell\autosys_parse_jobs.ps1:30 char:9

    + $key = $line.Substring(0, $index)

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : ArgumentOutOfRangeException

    Exception...

  • Reply To: Parse txt file

    cool thanks... I'll give it a test against my file..

  • Reply To: make script more robust

    When I run this code:

    It pops up a message:

    cmdlet Export-Csv at command pipeline position 1

    Supply values for the following parameters:

    InputObject:

    Not sure why it's doing this..

    $match_array = "error",...
  • Reply To: make script more robust

    I tried to goggle what you mentioned but above, but didn't find examples..

    Thanks.

  • Reply To: make script more robust

    Jeff,

    Looks like your mockup is exactly what I looking for, it doesn't seem to be finding anything from match_array . Would case

    have any bearing on Matches?

    Thanks again for your help...

  • Reply To: make script more robust

    Are you referring to the multiple job outputs?  We have a nightly process that copies previous days logs\output to a archive folder, so actually we won't get multiple outputs.

     

     

  • Reply To: make script more robust

    I would like to maybe add a date to the process to show which day the error refers too.

  • Reply To: make script more robust

    Sample output from csv:

    #TYPE Selected.Microsoft.PowerShell.Commands.MatchInfo

    "Path","LineNumber","Line"

    "\\ftpsrv\logs\EXTRACT.20741061-1.stdout","102","Authentication failed."

     

    It shows the Path with filename, and gives me the line in the file it found a match then the MESSAGE.

  • Reply To: make script more robust

    I'm running thru folders where output from job processing happens and sometimes the product we use to run\schedule jobs

    doesn't detect and error condition even though the SP or scripts output...

  • Reply To: make script more robust

    Thanks very much for reply, and I know you said un-tested code, but I was trying to get values for the $found_files to see

    what was returned and trying to understand...

  • Reply To: make script more robust

    That is my struggle multiple get-childitem calls and storing outputs to single variable to dump to csv.

    Thanks.

  • Reply To: make script more robust

    The multiple folders are from different machines.

Viewing 15 posts - 226 through 240 (of 686 total)