Forum Discussion

ngalchenko's avatar
ngalchenko
New Contributor
12 years ago

TestComplete - Can't read .ini file added to the Stores Files Collection, if file is located in folder other then root C:\ folder.

I can't read .ini file added to the Stores Files Collection, if file is located in folder other then root C:\ folder. Please help. I am using JScript. Below is more details: 1. I c...
  • Philip_Baird's avatar
    12 years ago
    Hi Natalya, you appear to have missed an escaping "\", between MyFolder and config123 i.e.



    ini = Storages.INI("C:\\MyFolder\config123.ini"); should be

    ini = Storages.INI("C:\\MyFolder\\config123.ini");



    Also, as you have the ini file in the Files Store, I would recommend using the Files::FileNameByName()  method to pass in the path to Storages::INI() method to avoid these issues in future, e.g.



    ini = Storages.INI( Files.FileNameByName( "AMITestConfiguration_INI" ) );



    where "AMITestConfiguration_INI" is the name in Files of the ini file you wish to process



    Regards,

    Phil Baird