How To Use New Undocumented Foxtools Function JustCSName()

Last reviewed: July 10, 1996
Article ID: Q153155
The information in this article applies to:
  • Microsoft Visual FoxPro for Macintosh, version 3.0b

SUMMARY

This 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 INFORMATION

JustCSName() 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 Example

In 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
KBCategory: kbprg kbhowto kbwebcontent
KBSubcategory: FxprgFoxtools



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 10, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.