Forum Discussion

Lagencie's avatar
Lagencie
Frequent Contributor
7 years ago

File Reader

Good Morning,

 

I have a problem with reading a File - I stored the File in the Stores.Files Section and want this place to be used as it will always be the same within the project.

 

I am using python:

 

data = aqFile.ReadWholeTextFile(Files.screen_px, aqFile.ctANSI)

 

tried this, but it wont accept the Files.xyz only wants a string - is there a way to a) get the path of the stored File within Stores.Files b) can i somehow use the Files.xyz

 

The File itself is a json file with .json ending


?

 

best regards

Dominik

1 Reply

  • karkadil's avatar
    karkadil
    Valued Contributor

    What you are looking for is method FileNameByName:

    var filePath = Files.FileNameByName('File_xyz')