GetFolderName$
FolderName$ = GetFolderName$(Filename$)
 
Parameters:

    Filename$ = The filename & path you wish to grab the folder name from
Returns:

    FolderName$ = The grabbed folder name
 

      The GetFolderName$ functions returns the folder name from an absolute filename/path.



FACTS:


      * None



Mini Tutorial:


      This example, shows how to grab the file extension, the filename, the directory folder and device name from an absolute filename.

      An absolute filename is a filename that contains the device, the directory and the filename. Like this "C:\Windows\MyFile.txt"

  
  
; Create a filename string for us to examine
  File$="C:\Windows\Temp\HelloWorld.TXT"
  
; Display the File extension from the filename
  Print GetFileExt$(File$)
  
; Display the just the FileName
  Print GetFileName$(File$)
  
; display the directory with device and folder name
  Print GetFolderName$(File$)
  
; just the device name
  Print GetDeviceName$(File$)
  
; Display the screen and wait for a key press
  Sync
  WaitKey
  
  




This example would output something like this.

  
  .TXT
  HelloWorld.txt
  C:\Windows\Temp\
C:
  

 
Related Info: GetDeviceName$ | GetFileExt$ | GetFileName$ :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com