Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) Demonstrate Directory Path FunctionsDemonstrates the path functions GetDirectoryName, GetExtension, GetFileName, and GetFileNameWithoutExtension.
Use ChilkatAx-win32.pkg Procedure Test Handle hoFac String sTemp1 Get Create (RefClass(cComCkFileAccess)) To hoFac If (Not(IsComObjectCreated(hoFac))) Begin Send CreateComObject of hoFac End // Note: Chilkat accepts either forward slash or backslash chars as directory separators.. Get ComGetDirectoryName Of hoFac "/MyDir/MySubDir/myfile.ext" To sTemp1 Showln sTemp1 Get ComGetDirectoryName Of hoFac "/MyDir/MySubDir" To sTemp1 Showln sTemp1 Get ComGetDirectoryName Of hoFac "/MyDir/" To sTemp1 Showln sTemp1 Get ComGetDirectoryName Of hoFac "/MyDir" To sTemp1 Showln sTemp1 Get ComGetDirectoryName Of hoFac "/" To sTemp1 Showln sTemp1 Get ComGetExtension Of hoFac "C:/mydir.old/myfile.ext" To sTemp1 Showln sTemp1 Get ComGetExtension Of hoFac "C:/mydir.old/" To sTemp1 Showln sTemp1 Get ComGetFileName Of hoFac "C:/mydir/myfile.ext" To sTemp1 Showln sTemp1 Get ComGetFileName Of hoFac "C:/mydir/" To sTemp1 Showln sTemp1 Get ComGetFileNameWithoutExtension Of hoFac "C:/mydir/myfile.ext" To sTemp1 Showln sTemp1 Get ComGetFileNameWithoutExtension Of hoFac "C:/mydir/" To sTemp1 Showln sTemp1 Showln "---" End_Procedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.