WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: morenos1 on November 04, 2019, 11:59:21 AM

Title: Simple string comparison.
Post by: morenos1 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.

Title: Re: Simple string comparison.
Post by: morenos1 on November 04, 2019, 12:54:02 PM
The text file containing variable "b" is output from PowerShell .....  (>>c:\output.txt)
Title: Re: Simple string comparison.
Post by: morenos1 on November 04, 2019, 01:17:35 PM
PowerShell deal. I got it working.

Thanks ....
Title: Re: Simple string comparison.
Post by: morenos1 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"
Title: Re: Simple string comparison.
Post by: morenos1 on November 04, 2019, 02:30:33 PM
My 2 simple text files to obtain variables "a" & "b" then compare...