Need help in script to open a text file

Hello all,
I am working on a script to open a text file. It has two parts. I have achieved results for first part.

Part 1:
When the button (object) is pressed:

Step 1: collect the object name and store it in an internal tag.

Step 2: open a text file (*.txt) that is stored on the desktop.
The name of the text file is the same as the object name of the button followed by .txt. So, the part of the script that opens the text file will find the name of the text file (to open) in the internal tag.

Part 2:
I need to introduce yet another internal tag that is to contain the path of the location where the text files are stored.

Then use this internal tag inside the script that opens the text file.

The purpose of this is to allow me to open a text file with any name that is stored in any location on the computer.

The text file will be determined by the object name of the button.

The location will be determined by the information in the internal tag that contains the path.

This way I can have this flexibility without the need to change the script.

If anyone can help me to achieve the second part. That will be really helpful.

Assuming your memory tagpath is `FileFolderPath’, you just need to read this in and append it to the front of your filename.

fileName = ...
folderPath = system.tag.readBlocking(['FileFolderPath'])[0].value
filePath = folderPath + "/" + fileName

Make sure that your folder path tag value uses forward slashes instead of backslashes. (You can use backslashes but you’ll need to double them up as backslashes are special characters in Python.)

thanks for your help.
how can use this folderPath in system.util.execute?

system.util.execute(['notepad.exe',filePath])