Function Reference

_FO_SearchEmptyFolders
Search for empty folders.
#Include <FileOperations.au3>
_FO_SearchEmptyFolders ( $sPath [, $iType = 0 [, $iArray = 1 [, $iFull = 1]]] )
Parameters
| $sPath | Search path |
| $iType |
[optional] How to determine the empty folders 0 - Folder can contain empty folders without adding them to the list (default) 1 - Folders are empty completely |
| $iArray |
[optional] Specifies the output: array or list 0 - Delimited list @CRLF 1 - Array, where $iArray[0]=number of folders (by default) 2 - Array, where $iArray[0] contains the first folder |
| $iFull |
[optional] Paths in returned data 0 - relative 1 - Full path (by default) |
Return Value
| Success: | Returns a list of folders. |
| Failure: | Returns an empty string and sets @error: |
| @error: | 0 - No error |
| 1 - Invalid path | |
| 2 - Not found |
Remarks
Function is used to delete empty folders using the list. If the root directory is added to the result in this case only one. When $iFull = 0 root directory is returned as an empty string.Example


; AZJIO
; http://www.autoitscript.com/forum/topic/133224-filesearch-foldersearch/
#include <Array.au3> ; for _ArrayDisplay
#include <FileOperations.au3>
;=======================================
$timer = TimerInit()
$FolderList = _FO_SearchEmptyFolders(@UserProfileDir, 0, 0)
MsgBox(0, 'Time : ' & Round(TimerDiff($timer) / 1000, 2) & ' sec', $FolderList)
;=======================================
$timer = TimerInit()
$FolderList = _FO_SearchEmptyFolders(@WindowsDir)
_ArrayDisplay($FolderList, 'Time : ' & Round(TimerDiff($timer) / 1000, 2) & ' sec')