Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... 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-2024 Chilkat Software, Inc. All Rights Reserved.