REXX Tips & Tricks, Version 2.80


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


The function FILESPEC()



The function <FILESPEC called with the parameter D (for Drive) returns all 
chars up to the first colon in the filename. 
Example: 

 
/*                            */
  say filespec( "D", "__D__:\test" )

/* -> returns:                */
/*      "__D__:"              */

  say filespec( "D", "  D:\test" )

/* -> returns:                */
/*      "  D:"                */

In general, the function <FILESPEC only checks the syntax of the parameter 
string; it does not check if the parameter is a valid file or directory 
name.  (see also Expand the function FILESPEC)   

Inf-HTML End Run - Successful