Hi,
When it comes to writing or reading a file to or from a folder for the purposes of a project, I've always made sure the project and files for it are in the same folder, directly on the C:\ drive.
e.g. C:\MyProject\Proj_1.exe and C:\MyProject\ProjData_A.txt
That way I know that the filepath will always be correct, if however I give a copy of a utility I've written to (say) my grandson, (Ivor Mintin) he may want to put it in a different Folder somewhere on his hard drive which of course means the 'ProjData_A.txt' file will never be found.
I know there's a way of naming a filepath which in essesence says 'Go to the folder from which this program is running' and open file 'ProjData_A.txt', but I can't find how to do that.
Poppa
When it comes to writing or reading a file to or from a folder for the purposes of a project, I've always made sure the project and files for it are in the same folder, directly on the C:\ drive.
e.g. C:\MyProject\Proj_1.exe and C:\MyProject\ProjData_A.txt
That way I know that the filepath will always be correct, if however I give a copy of a utility I've written to (say) my grandson, (Ivor Mintin) he may want to put it in a different Folder somewhere on his hard drive which of course means the 'ProjData_A.txt' file will never be found.
I know there's a way of naming a filepath which in essesence says 'Go to the folder from which this program is running' and open file 'ProjData_A.txt', but I can't find how to do that.
Poppa