help with geting list from loop Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
User avatar
Tomer
Posts: 253
Joined: 21 Aug 2016, 05:11

help with geting list from loop

22 Apr 2018, 05:19

hello,

i'd like to get a list only of the exclude folders aswell,
so the list in the msgbox will be displayed exactly like:

"Windows" "Users" "Program Files" "ProgramData" "$Recycle.Bin"

Code: [Select all] [Download] GeSHi © Codebox Plus

vDir1 := "C:"
vList := ""
Loop, Files, % vDir1 "\*", D ; folders
{
if !(A_LoopFileName = "Windows")
&& !InStr(A_LoopFileName, "Users") && !InStr(A_LoopFileName, "Program Files") && !InStr(A_LoopFileName, "ProgramData") && !InStr(A_LoopFileName, "$Recycle.Bin")
vList .= A_LoopFileFullPath "|"
}

vList := SubStr(vList, 1, -1)
MsgBox, % StrReplace(vList, "|", "`n")
swagfag
Posts: 851
Joined: 11 Jan 2017, 17:59

Re: help with geting list from loop

22 Apr 2018, 06:48

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

User avatar
Tomer
Posts: 253
Joined: 21 Aug 2016, 05:11

Re: help with geting list from loop

22 Apr 2018, 07:25

thanks!

1. this is total new code, any chance to stick the original code ?

2. anyway, i updated the code to get the "folderBlacklist" in this way:
"Windows" "Users" "Program Files" "ProgramData" "$Recycle.Bin"

problem is this change effects now on the "excludedFolders" list aswell..

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

swagfag
Posts: 851
Joined: 11 Jan 2017, 17:59

Re: help with geting list from loop  Topic is solved

22 Apr 2018, 08:18

without functions

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

User avatar
Tomer
Posts: 253
Joined: 21 Aug 2016, 05:11

Re: help with geting list from loop

23 Apr 2018, 03:27

tnx swagfag
works great (I am not an advocate of functions either)

Return to “Ask For Help”

Who is online

Users browsing this forum: eetech88, Google [Bot], L40P, marsa and 33 guests