How can a limit be applied to the Loop, Files function to only loop 3 folders deep?
Example code below does not work as intended.
All help and guidance is appreciated.
Code: Select all
Loop, Files, %A_WinDir%\system32\*.*, DR
{
StrReplace(A_LoopFileFullPath, "\", "\", DirLimit) ; this doens't work: trying to set limit to 3 folders deep.
If (DirLimit = 3)
Continue
Tooltip, % A_LoopFileFullPath
}
Esc::
ExitApp