I am using Open/Create/Replace File in LabVIEW 2010 to open a text file. This works fine until I compile the code. I then get Error 7. I have tried paths that look like the following but none work.
Solved! Go to Solution.
Why do you have a text file that is stored in a subdirectory called read.exe?
Do you actually have an executable called Read.exe?
I thought when VIs were compiled the paths were changed to preserve the hierarchy to reflect how they are saved. My intent is to show the file as being in a subdirectory in the folder the .exe is in.
You have to get the path to the folder of the .exe. Then strip off the .vi name and the .exe name. Then Build onto the path from there to get to your .txt file. The way you have it, you are treating the .exe as a folder rather than a file. The text file is not part of the .exe, so you can't create a path that includes the .exe name.