Home > comp > gb > file > dir 
 en fr de es it nl pl pt pt_BR mk sq ca hu cs tr ar fa id vi ko ja ru zh zh_TW
Previous  Next  Edit  Rename  Undo  Search  Administration  
Documentation  
Warning! This page is not translated.  See english version 
File.Dir (gb)
STATIC FUNCTION Dir ( Path AS String ) AS String

Returns the directory component of a file path.

This example will display information about a file path selected by the user. It uses the methods File.Name, File.BaseName, File.Ext and File.Dir.

Example

PUBLIC SUB ButtonDisplayPath_Click()
  IF Dialog.OpenFile() THEN RETURN
  PRINT "Full file path: " & Dialog.Path
  PRINT "File name (with extension): " & File.Name(Dialog.Path)
  PRINT "File name (without extension): " & File.BaseName(Dialog.Path)
  PRINT "File extension: " & File.Ext(Dialog.Path)
  PRINT "Directory of the file: " & File.Dir(Dialog.Path)
END