Is there possibility to pair Loop, Files with Else like below?
Code: Select all
Loop, Files , %pathwthwildcard1%
{
;; if A_LoopFileLongPath is retrieved
}
Else
{
;; if there's no file
}
Code: Select all
Loop, Files , %pathwthwildcard1%
{
;; if A_LoopFileLongPath is retrieved
}
Else
{
;; if there's no file
}
you can add a count for everytime a file is found and if its 0 do somethingBriHecato wrote:What is the behavior in this case?
Is there possibility to pair Loop, Files with Else like below?
Code: Select all
Loop, Files , %pathwthwildcard1% { ;; if A_LoopFileLongPath is retrieved } Else { ;; if there's no file }
Code: Select all
If FileExist(pathwthwildcard1)
{
Loop, Files, %pathwthwildcard1%
{
;; file A_LoopFileLongPath is found
}
else
{
;; sorry no file....
}
Code: Select all
q:: ;check if dir is empty
;vDir1 := A_ScriptDir "\"
vDir1 := A_ScriptDir "x\"
vDirIsEmpty := 1
Loop, Files, % vDir1 "\*", FD
{
vDirIsEmpty := 0
break
}
MsgBox, % vDirIsEmpty
return
Users browsing this forum: Auntiejack56, Descolada, ntepa, Xtra and 142 guests