06-01-2010 02:20 PM
Hi all,
I am working on a Project and needed some data to be reorded in some binary files. However, when I moved the entire project to a different system for testing, Most of the files show "File not Found" error.
Do I need to change the path of all the files manually? Is it not possible to make the folder independent of the root directory in which the project folder is kept. Else, the program will loose its flexibility making it too much system dependent.
Please help!
Thanks,
RJ
06-01-2010 03:03 PM
It may be that the files (whether they have data in them or not) have to exist or your vi throws an error. If you may need to change the option on the file write functions to write if doesn't exist option. Else you can write a short start up vi that creates file structure you need for the entire program as the program loads for the first time. You could also do an error recovery case for file does not exist to see if this is the first time through...then create the file on a not exist error...
Lots of ways to fix it...just depends on what you want to do...
Is it failing on the first read or write...or what?
Hummer1
06-01-2010 03:13 PM
Hi Hummer,
Thanks for the reply.
Let me give an example to sound more precise!
present location is : c:\documents\RJ\Labview Projects\Project1
When I pasted the folder to d:,
new location was : d:\project1
Now all my source files have path address as c:\.......
but everything is inside the folder "project1". I need that no matter where I move this folder, Labview is able to locate all the files inside.
It is similar to "web page desigining". as long as all the documents are intact in a single folder, No matter where we move the folder,
the web pages are able to locate each other.
regards,
RJ
06-01-2010 03:19 PM
I think I would put a machine search algorithm in a file does not exist case...to look for the file structure throughout the machine (perhaps by changing the various path parameters one at a time...starting with drive first:) and then throw a big error asking for human help (browse to folder) if the machine search failed...If it succeeded, or the browse worked, then change the reference path....(WARNING WILL ROBINSON....THIS COULD BE DANGEROUS)...
just a thought.
Hummer1