How To Use New Undocumented Foxtools Function JustCSName()Last reviewed: July 10, 1996Article ID: Q153155 |
The information in this article applies to:
SUMMARYThis article describes how to use a new Foxtools function that returns the file name portion of a complete path and file name and preserves the case of the letters in the file name. It is called the JustCSName() function.
MORE INFORMATIONJustCSName() returns the file name portion of a complete path and file name while preserving the case of the letters in the file name as they appear in the Macintosh Finder. The syntax is:
JustCSName(cFilename)where cFilename Specifies the name (including path) of the file for which you want only the case-sensitive name. JustCSName returns a character string. The JustCSName function is similar to the JustFName() function already documented in Foxtools.hlp. The Foxtools.hlp file documents other Foxtools.cfm (or Foxtools.slm) functions. It is located in the Microsoft Visual FoxPro:Tools folder.
Step-by-Step ExampleIn the Visual FoxPro Command window, type in the following commands to see how JustCSName() works in relation to JustFName() and the GETFILE() functions. The Visual FoxPro screen should be visible so the results of the ? commands are visible:
? GETFILE() *Choose any file, preferably one that has upper- and lower-case letters *when viewed in Finder. SET LIBRARY TO HOME()+"Foxtools.cfm" ? JustFName(GETFILE()) *The first of these two commands loads the Foxtools library. Choose *the same file as above when GETFILE() is issued and the JustFName() *function will strip off the path and return just the file name. ? JustCSName(GETFILE()) *This command will return a result similar to the JustFName() function, *except the case of the letters in the file name will be preserved. |
Additional reference words: 3.00b VFoxMac
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |