FullName: String;
The FullName property returns a full path and a file name.
Sub Main;
Var
Dir: IDirectoryInfo;
FileSInfo: IFileSystemInfo;
s: String;
Begin
Dir:=New DirectoryInfo.Attach("c:\New_folder");
If Dir.Exists And (Dir.GetFiles("*").Count<>0) Then
s:=Dir.GetFiles("*").Item(0).FullName;
End If;
Dispose Dir;
End Sub Main;
After executing the example, the "s" variable contains complete path and file name of the first file if the New_folder directory exists and contains files.
See also: