Search the Community
Showing results for tags 'exclude subfolders'.
-
Can anybody please help about how to exclude subfolders with the _FileListToArrayRec function? According to the F1 helpfile this should create an array including subfolders, where subfolders like Include should be excluded: ; And now ignoring the "Include" folder #include <Array.au3> $aArray = _FileListToArrayRec($sAutoItDir, "*||include", $FLTAR_FILESFOLDERS, $FLTAR_RECUR, $FLTAR_SORT) _ArrayDisplay($aArray, "No 'Include' folder") But it doesn't work if I change it to: ; And now ignoring the "Windows" folder #include <Array.au3> $aArray = _FileListToArrayRec("C:\", "*||Windows", $FLTAR_FILESFOLDERS, $FLTAR_RECUR, $FLTAR_SORT) _ArrayDisplay($aArray, "No 'Windows' folder") But this is what I really want to do: Create an array only with all filenames including full path, for all root and subfolders, sorted, but without system and hidden files, and without the following root and subfolders: C:\ $Recycle.Bin, C:\ Program Files, C:\ Program Files (x86) , C:\Users, C:\Windows #include <Array.au3> Global $aArray = _FileListToArrayRec("C:\", "*||$Recycle.Bin||" & Chr(34) & "Program Files" & Chr(34) & "||" & Chr(34) & "Program Files (x86)" & Chr(34) & "||Users||Windows", $FLTAR_FILES+$FLTAR_NOSYSTEM+$FLTAR_NOHIDDEN, $FLTAR_RECUR, $FLTAR_FASTSORT, $FLTAR_FULLPATH) _ArrayDisplay($aArray, "_ArrayDisplay is only showing the first 65.525 rows of the $aArray") ; Please note: $aArray[0] shows 284.868 rows created. Please note, that my code above can be compiled without any syntax errors, and can run without any syntax errors, but the created array doesn't exclude any of the wanted subfolders.