$text = 'C:\xxx\hh\hhhh\hhh\image.JPG'
$out = StringRegExp($text,'.*\\(.*)\\',1) Return the last folder hhh. I would use this expression in the cycle below. Local $aArray = _FileListToArrayRec("C:\test\app", "*app.exe", $FLTAR_FILES, 1, $FLTAR_SORT,$FLTAR_FULLPATH)
$fileArray = UBound($aArray) -1
For $y = 1 To $fileArray
_GUICtrlListView_AddItem($ListView, StringRegExp($aArray[$y],'.*\\(.*)\\',1), 0)
Next My target is to remove everything from the path, and take only the last folder. Thanks