Author Topic: Simple string comparison.  (Read 65 times)

morenos1

  • Jr. Member
  • **
  • Posts: 84
Simple string comparison.
« on: November 04, 2019, 11:59:21 am »
It has to be me.

I can not get results comparing a simple string.

Reading simple variable "a" from an ini file.

[mct]
ver=1.00.0000

a=1.00.0000

Reading variable "b" from a text file using FileGet or FileGetW  (Unicode?)

1.00.0000

b=1.00.0000

Comparing both strings if they are equal will give not true.

Assigning both variables within the script gives true.


morenos1

  • Jr. Member
  • **
  • Posts: 84
Re: Simple string comparison.
« Reply #1 on: November 04, 2019, 12:54:02 pm »
The text file containing variable "b" is output from PowerShell …..  (>>c:\output.txt)

morenos1

  • Jr. Member
  • **
  • Posts: 84
Re: Simple string comparison.
« Reply #2 on: November 04, 2019, 01:17:35 pm »
PowerShell deal. I got it working.

Thanks ....

morenos1

  • Jr. Member
  • **
  • Posts: 84
Re: Simple string comparison.
« Reply #3 on: November 04, 2019, 02:09:34 pm »
Never mind,

I thought I had it working but no cigar.

Variable b comes from a text file created with "| Out-File -FilePath c:\temp\ONESolutionVER.txt"

morenos1

  • Jr. Member
  • **
  • Posts: 84
Re: Simple string comparison.
« Reply #4 on: November 04, 2019, 02:30:33 pm »
My 2 simple text files to obtain variables "a" & "b" then compare...