OS/2 Procedures Language 2/REXX


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


FILESPEC




 >>--FILESPEC(option,filespec)------><

FILESPEC returns a selected element of filespec, a given file 
specification, identified by one of the following strings for option: 
 Drive       The drive letter of the given filespec. 
 Path        The directory path of the given filespec. 
 Name        The filename of the given filespec. 
 
 If the requested string is not found, then FILESPEC returns a null string 
 (" "). 
 Note:    Only the the initial letter of option is needed. 
          Here are some examples: 

          thisfile = "C:\OS2\UTIL\EXAMPLE.EXE"
          say FILESPEC("drive",thisfile)     /* says "C:"          */
          say FILESPEC("path",thisfile)      /* says "\OS2\UTIL\"  */
          say FILESPEC("name",thisfile)      /* says "EXAMPLE.EXE" */
          
          part = "name"
          say FILESPEC(part,thisfile)        /* says "EXAMPLE.EXE" */
          
            

Inf-HTML End Run - Successful