User Tools

Site Tools


syntax:functions:filename

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
syntax:functions:filename [2018/06/11 07:13] dmitrysyntax:functions:filename [2022/11/11 10:02] (current) – [Remarks] dmitry
Line 1: Line 1:
-===== filename(text) =====+====== Filename(full_path) ====== 
 +Category:  File function  (found in the "Special" category in the EasyMorph application) 
 + 
 +\\  
 +=====Description===== 
 +This function extracts the filename (without extensionfrom a full file path. 
 + 
 +\\  
 +=====Arguments===== 
 +^Argument^Type^Description^ 
 +|full_path  |Text  |A file path including the file name.| 
 + 
 +**Return value type:** Text. 
 + 
 +\\  
 +=====Remarks===== 
 +This function works with both relative and absolute file paths. 
 + 
 +The file name can contain dots. In this case, the last dot separates the file name for the file extension (if present). 
 +\\  
 +=====Examples===== 
 + 
 +  filename('C:\Documents\myproject.morph' //Returns 'myproject' 
 + 
 +  filename('…\mypath\myfile.txt' //Returns 'myfile' 
 + 
 +\\  
 +=====See also===== 
 +  * [[syntax:functions:directory|Directory(full_path)]] 
 +  * [[syntax:functions:fileextension|FileExtension(full_path)]]
  
-Extracts the filename (without extension) from a full file path. 
  
-^  Example  ^  Result  ^ 
-| filename('C:\Documents\myproject.morph' |myproject | 
syntax/functions/filename.1528715626.txt.gz · Last modified: 2018/06/11 07:13 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki