06-19-2008 06:55 AM
06-19-2008 07:15 AM
rashid19672008 wrote:
I need a utility which can convert absolute paths to relative paths. Its purpose is to replace the absolute paths used throughout the project with relative paths. It will be used wherever path constants are used, it will find the relative path to the same file i.e, its input will be an absolute path to a file and it will provide a relative path to the same folder hierarchy.
And yet one more unrelated question. Is it possible to change my nick for this forum? If yes then how?
06-19-2008 07:41 AM
Paths are always a confusing issue for me. Where to save app data, user data, preferences, config data? Should I use relative or absolute path? How do I deal with the file system being networked, and permissions? There is one additional solution I use often: (WINDOWS ONLY) which is to use the CSILD values through the shell32.dll. These are system independent (and even Win OS version) variables provided by M$ for common paths to save data. Examples are Common App Data, Cookies and desktop. Does any one else use this method? It would be nice if additional path constants were provided by Labview to standardize (or at least provide a de facto method) for understanding where to keep data external to an application.
Paul
06-19-2008 08:57 AM
06-19-2008 08:59 AM
falkpl wrote:
It would be nice if additional path constants were provided by Labview to standardize (or at least provide a de facto method) for understanding where to keep data external to an application.
06-19-2008 09:36 AM
I posted an example earlier (I know you've already done this) to help people link to common Windows locations with the method you described. Thought I'd link it here.
@falkpl wrote:
Paths are always a confusing issue for me. Where to save app data, user data, preferences, config data? Should I use relative or absolute path? How do I deal with the file system being networked, and permissions? There is one additional solution I use often: (WINDOWS ONLY) which is to use the CSILD values through the shell32.dll. These are system independent (and even Win OS version) variables provided by M$ for common paths to save data. Examples are Common App Data, Cookies and desktop. Does any one else use this method?
Paul
06-19-2008 10:25 AM
06-19-2008 10:31 AM
06-19-2008 10:33 AM
06-19-2008 10:35 AM
Just note that you have to decide what the path is relative to since that can change when you build an executable. If it's relative to the directory the top level VI is in, like shown in my example, you should usually be fine.
C .DOT wrote:
Thanks for giving a green signal to the use of relative paths if a project is to be converted into an exe.