Forum Discussion
jeremy_bertrand
12 years agoContributor
Tanya,
OK,
Could you please describe what happens when you execute this code?
When I use the line that you and Phil have suggested I do not get anything. No error, No file, no Sections, no SubSections, no options.
It is like it's there but it finds nothing but empty values.
See Attached image.
What is the expected and the actual behavior?
This was supposed to be able to allow me to set project suite variables to values from the ini file. You open the file, read the values associated to the subsection/section, read the options in the only section besides "[Root]" then assign the values to the corresponding project suite variable.
The actual behavior for when I have the script get the file with the absolute path as opposed to the shortcut by using the Files.Filename or Files.FileNameByName("string") or Files.GetFileName("string"), etc.
I get nothing back its is like it does not recognize the file. or that the file is empty.
I have tried to log the name of the file in stores, I get no name.
The only way to that I have found to do what I need it to do is have the "String" be the full and absolute path to the ini file. I have not tried to use the project or project suit path as a starting point so that may be a possible workaround. but I have already got my scripts to recognize the file place on the "C" drive. that way it is machine dependant not project suite dependant.