[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
| Title: | -={ H A C K E R S }=- | 
| Notice: | Write locked - see NOTED::HACKERS | 
| Moderator: | DIEHRD::MORRIS | 
|  | 
| Created: | Thu Feb 20 1986 | 
| Last Modified: | Mon Aug 03 1992 | 
| Last Successful Update: | Fri Jun 06 1997 | 
| Number of topics: | 680 | 
| Total number of notes: | 5456 | 
654.0. "partial-filespec -> full-filespec help" by FOO::BHAVNANI (When in doubt, blame the compiler.) Wed Jan 07 1987 22:57
 I'm  looking  for  a LIB$/SYS$ routine that will return a full filespec from a
 partial one.  Something along the lines of
		gets (filename);
		if ((infile=fopen(filename,"r"))==NULL)
		   {
		     lib$return_full_filespec (filename, fullname);
		     printf ("Error opening %s; as input\n", fullname);
		   }
 such that if the user enters "[--.xyzzy]foo.bar" for filename, and his default 
 directory is "user$disk:[jdoe.test]", my application will say
		Error opening USER$DISK:[XYZZY]FOO.BAR; as input
 I  can  do this using fgetname() if the file *was* opened successfully, but am
 having  a  hard time expanding the filespec when I can't access the file.  Any
 pointers or source code examples :-) would be appreciated.  Tnx much,
 /ravi
| T.R | Title | User | Personal Name
 | Date | Lines | 
|---|
| 654.1 | Try LIB$FIND_FILE | ILO::LENIHAN | John Lenihan 353-91-25128 | Fri Jan 08 1988 05:43 | 5 | 
|  |     I could be wrong but I seem to remember that the routine LIB$FIND_FILE
    when given a wildcard in the file-spec field returns the full file
    specification in the result-spec(if any) field.
    
    � J.
 | 
| 654.2 | $PARSE RMS service | SUCASA::LINDQUIST |  | Fri Jan 08 1988 09:00 | 6 | 
|  |     I believe that if you use the RMS service $PARSE with a
    modifier of FAB$M_OFP (output file parse) and specify an
    expanded string buffer, the expanded string returned will be
    what you're after.
    
    	- Lee
 | 
| 654.3 | or DCL f$parse... | STAR::DICKINSON | Peter | Fri Jan 08 1988 10:39 | 0 |