I found this code on this forum and modified it but it is not working for me. In MsgBox i want to show the folder name and path but its showing only path not name. _RecFileFinder(@ScriptDir & "\", "_Found", "*", "", 1) Func _Found($Path, $IsFolder) Select Case $IsFolder $FolderPath = StringSplit($Path,@CRLF,1) For $i = 1 To $FolderPath[0] $FolderName = StringSplit($FolderPath[$i],"\",1) MsgBox(0,"","Folder name: "&@CRLF&$FolderName[0]&@CRLF&"Folder path