We help IT Professionals succeed at work.

Get Path from .INI File in VFP6

ASPDEV
ASPDEV asked
on
Hello,

I'm working on VFP 6 version, I need to know how can I get Path string from .INI File in FoxPro 6.

I have task, where I need to get the Path of the file location on the server, so that I can have .INI file in my application which has the path info.

In the program, i need to get that path from Test.INI file.

e.g

Test.INI
C:\TEST\Data.txt

I need whole path(C:\TEST\Data.txt) in my variable in the Test.Prg Visula FoxPro6
Comment
Watch Question

Check the FILETOSTR function if your INI file just containes the path

Commented:
As has already been suggested above one way is to create a single string containing the contents of the file using the FILETOSTR() function.   Then within that single string your program would 'look' for the needed path.

Another way if the contents are more complex is to use low-level operations to FOPEN() the INI file and then interrogate the contents with other low-level functions such as FGETS(), etc.

Good Luck

Author

Commented:
Thanks,

It's working