Get second column data from txt file without trailing space

Good afternoon friends; A query please, I need to obtain the data of the second column (PORTFOLIO) of the txt file without space at the end. In the example there is only one case, but the file has data without a space at the end (correct), but others have an extra space (incorrect.)

I use that data, because I rename the txt files, but since there is an extra space at the end, it causes me problems with other applications.

The original txt file comes with a name similar to this: download20201101_122321.txt

To get the reading of the second row of the .txt I use this:

To read the name of the “CARTERA” I use this:

Everything above works fine, but it generates a txt file for me as follows:

CDT. GTS PERU LIMA .txt <------- has a space at the end and I don’t want that.

How could I remove only the space at the end of the “CARTERA” name?

CDT. GTS PERU LIMA.txt (367 Bytes)


Thank you very much friend!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.