Advertisement
BugFix

Untitled

Nov 13th, 2012
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.81 KB | None | 0 0
  1. Func _ShowSubFolders($Folder, $Ext='*', $Dir=-1, $Delim=@CRLF)
  2.     If Not IsDeclared("strFiles") Then Global $strFiles = ''
  3.     If ($Dir = -1) Or ($Dir = 0) Then
  4.         For $file In $Folder.Files
  5.             If $Ext <> '*' Then
  6.                 ; == nur $Ext
  7. ;~                 If StringRight($file.Name, StringLen($Ext)) = $Ext Then _
  8. ;~                     $strFiles &= $file.Path & $Delim
  9.                 ; == alles ausser $Ext 
  10.                 If StringRight($file.Name, StringLen($Ext)) <> $Ext Then _
  11.                     $strFiles &= $file.Path & $Delim
  12.             Else
  13.                 $strFiles &= $file.Path & $Delim
  14.             EndIf
  15.         Next
  16.     EndIf
  17.     For $Subfolder In $Folder.SubFolders
  18.         If ($Dir = -1) Or ($Dir = 1) Then $strFiles &= $Subfolder.Path & '\' & $Delim
  19.         _ShowSubFolders($Subfolder, $Ext, $Dir, $Delim)
  20.     Next
  21. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement