• <Helps for GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Array Object
      • Audio Object
      • Barcode
      • File Object
      • Freq Object
      • HashMap Object
      • List Object
      • Map Object
      • Path
        • Path Namespace
        • Path.Concat Function
        • Path.GetDirectoryName Function
        • Path.GetExtension Function
        • Path.GetFileName Function
        • Path.GetFileNameWithoutExtension Function
      • Pff Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
    • Templated Reporting System
    • Appendix
  • <Helps for CSEntry>
  • <Helps for CSBatch>
  • <Helps for CSTab>
  • <Helps for DataViewer>
  • <Helps for TextView>
  • <Helps for TblView>
  • <Helps for TRSWin>
  • <Helps for CSDeploy>
  • <Helps for CSPack>
  • <Helps for CSFreq>
  • <Helps for CSSort>
  • <Helps for CSExport>
  • <Helps for CSReFmt>
  • <Helps for CSDiff>
  • <Helps for CSConcat>
  • <Helps for TRSSetup>
  • <Helps for ParadataViewer>
  • <Helps for ParadataConcat>
  • <Helps for CSIndex>
  • <Helps for Excel2CSPro>
  • <Helps for CSWeb>

Path Namespace

The path namespace is a set of functions used to perform operations on a path or to get information from a path specification.
Functionality
FunctionDescription
path.concatCombines multiple strings into one string representing a file path.
path.getDirectoryNameExtracts the directory name from a file path.
path.getExtensionExtracts the file extension from a file path.
path.getFileNameExtracts the file name from a file path.
path.getFileNameWithoutExtensionExtracts the file name without its extension from a file path.
Example
string data_path = "C:\CSPro Data Files\Region 1\COVID-19 Survey.csdb";

string data_directory = path.getDirectoryName(data_path);
// result: C:\CSPro Data Files\Region 1\

string data_filename = path.getFilename(data_path);
// result: COVID-19 Survey.csdb

string data_extension = path.getExtension(data_path);
// result: .csdb

string data_filename_without_extension = path.getFilenameWithoutExtension(data_path);
// result: COVID-19 Survey
See also: PathName Function