Software Archive
Read-only legacy content

Find path

Intel_C_Intel
Employee
1,169 Views
My CVF documentation tell me to use fullpathqq to obtain the path of a file. Doesn't work. It seems that fullpathqq is the Fortran equavalent of the C function _fullpath, which constructs a full filename by adding a path to a name. Is it possible that the cvf documentation is wrong? And if it is, who tested out that example in the cvf manual?
0 Kudos
12 Replies
Steven_L_Intel1
Employee
1,169 Views
I just tried the example (looking at the 6.5 documentation) and it seems to do what it advertises. What exactly do you think is the difference?

Steve
0 Kudos
Intel_C_Intel
Employee
1,169 Views
My documentation says that fullpathqq "Returns the full path for a specified file or directory.", and that the syntax is "result = FULLPATHQQ ( name, pathbuf ) ", where name is the "Item for which you want the full path.", and pathbuf is "Buffer to receive full path of the item specified in name."

Yet when I use it, all it does it add the current working path to the name.

I expected it to find the path of the file 'name'.
0 Kudos
Steven_L_Intel1
Employee
1,169 Views
Ah, I think I see. Do you think that it searches for the file using the PATH environment variable and tells you where it found it? It doesn't, and the documentation doesn't say it does. The manual says the file specified: "Can be the name of a file in the current directory, a relative directory or filename, or a network uniform naming convention (UNC) path. " The idea is that it returns the fully qualified path (full path) for a file specification that is not fully qualified, using the normal file specification conventions. So if it is a file in the current directory (and no directory was specified), you get the current directory. If you say ..file.txt, you get the full path of the parent directory, and so on.

I think you misunderstood the description.

Steve
0 Kudos
Intel_C_Intel
Employee
1,169 Views
Jeepers, where did you get all that description. My manual doesn't say any of that. I am looking at dfmain.chm, dated 2/3/2000. (And why am I looking at that specific file? Well, as we all know, the CVF manual gets lost when one loads a new version of Visual C++).
0 Kudos
Steven_L_Intel1
Employee
1,169 Views
I am looking at the CVF 6.5A version of the manual. I don't have the older one handy to see if it was different - it may have been.

You should see our knowledge base article Q1031 regarding the help collections. No need to explicitly look at DFMAIN.CHM if you don't want to.

Steve
0 Kudos
Intel_C_Intel
Employee
1,169 Views
We have been (nearly) here before - see the exchange on GetFullPathName - currently down near No. 90. I still have no solution (other than my successful DOS version) for a complete search of a drive for a file, returning the full path(s). Does anyone know how?
0 Kudos
Steven_L_Intel1
Employee
1,169 Views
What, exactly, would you like such a function to do? Isn't this just "search all possible drives for the file"? Or do you want to restrict it to the PATH environment variable?

Steve
0 Kudos
Intel_C_Intel
Employee
1,169 Views
For my purposes, I would not want to have all possible drives searched, but would be satisfied with searching the path environmental variable as long as it is capable of searching in all its sub-directories if requested. This would enable me to search either a complete drive if I need to, or perhaps just a single directory if I have more specific information on the file's location
0 Kudos
Steven_L_Intel1
Employee
1,169 Views
Well, you'll have to write such a routine yourself. That's not what FULLPATHQQ is for (it returns the fully qualified file path for the given file).

Steve
0 Kudos
Intel_C_Intel
Employee
1,169 Views
For my purposes, I would not want to have all possible drives searched, but would be satisfied with searching the path environmental variable as long as it is capable of searching in all its sub-directories if requested. This would enable me to search either a complete drive if I need to, or perhaps just a single directory if I have more specific information on the file's location
0 Kudos
Intel_C_Intel
Employee
1,169 Views
I'm sorry my reply was duplicated - your website is being user-unfriendly from this end, including appearing to let me edit my reply, but then submitting the original.

On the searching for files topic, I think I will stick with my DOS command called by SYSTEMQQ until your Fortran has something to offer - something you might put in your next upgrade perhaps?

Over and out.
0 Kudos
Steven_L_Intel1
Employee
1,169 Views
I don't see us adding a routine of this nature. We already offer routines for traversing directories.

Steve
0 Kudos
Reply