Difference between revisions of "BASENAME()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to return the base filename from a given file specification | Function to return the base filename from a given file specification | ||
− | |||
==Syntax== | ==Syntax== | ||
BASENAME(<expC>) | BASENAME(<expC>) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[DBF | + | [[DBF()]], [[GETENV()]], [[GETLOG()]], [[NDX()]], [[SET FULLPATH]] |
− | + | ||
==Description== | ==Description== | ||
The BASENAME() function returns the base filename from the file specification <expC>. This function is very useful when used in conjunction with the command, SET FULLPATH ON. The BASENAME() functions always returns a character string without changing the case. | The BASENAME() function returns the base filename from the file specification <expC>. This function is very useful when used in conjunction with the command, SET FULLPATH ON. The BASENAME() functions always returns a character string without changing the case. | ||
− | |||
==Example== | ==Example== | ||
Line 21: | Line 17: | ||
set fullpath on | set fullpath on | ||
? dbf() | ? dbf() | ||
− | / | + | /opt/recital/data/demo/accounts.dbf |
? basename(dbf()) | ? basename(dbf()) | ||
accounts.dbf | accounts.dbf | ||
</code> | </code> | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] |
Revision as of 08:27, 10 February 2012
Contents
Purpose
Function to return the base filename from a given file specification
Syntax
BASENAME(<expC>)
See Also
DBF(), GETENV(), GETLOG(), NDX(), SET FULLPATH
Description
The BASENAME() function returns the base filename from the file specification <expC>. This function is very useful when used in conjunction with the command, SET FULLPATH ON. The BASENAME() functions always returns a character string without changing the case.
Example
? dbf() accounts.dbf set fullpath on ? dbf() /opt/recital/data/demo/accounts.dbf ? basename(dbf()) accounts.dbf