Difference between revisions of "BASENAME()"

From Lianjapedia
Jump to: navigation, search
 
 
(5 intermediate revisions by 2 users not shown)
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()]], [[FMT()]], [[GETENV()]], [[GETLOG()]], [[NDX()]], [[SET FULLPATH]]
+
[[DBF()]], [[DEFAULT()]], [[DEFAULTEXT()]], [[FORCEEXT()]], [[FORCEPATH()]], [[GETENV()]], [[JUSTEXT()]], [[JUSTFNAME()]], [[JUSTPATH()]], [[JUSTSTEM()]], [[JUSTDRIVE()]], [[NDX()]], [[PATH()]], [[SET FULLPATH]], [[SET PATH]], [[SYS()]]
 
+
  
 
==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==
 
<code lang="recital">
 
<code lang="recital">
 
? dbf()
 
? dbf()
accounts.dbf
+
customers.dbf
 
set fullpath on
 
set fullpath on
 
? dbf()
 
? dbf()
/usr/recital/UD/demo/accounts.dbf
+
/opt/lianja/data/southwind/customers.dbf
 
? basename(dbf())
 
? basename(dbf())
accounts.dbf
+
customers.dbf
 
</code>
 
</code>
 
+
 
+
==Products==
+
Recital Server, Recital
+
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]

Latest revision as of 09:02, 16 November 2012

Purpose

Function to return the base filename from a given file specification

Syntax

BASENAME(<expC>)

See Also

DBF(), DEFAULT(), DEFAULTEXT(), FORCEEXT(), FORCEPATH(), GETENV(), JUSTEXT(), JUSTFNAME(), JUSTPATH(), JUSTSTEM(), JUSTDRIVE(), NDX(), PATH(), SET FULLPATH, SET PATH, SYS()

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()
customers.dbf
set fullpath on
? dbf()
/opt/lianja/data/southwind/customers.dbf
? basename(dbf())
customers.dbf