I got this piece of script that can dig into two-wildcard path and retrieve filename.
But it cannot do the "else" action (if file doesn't exist).
What am I doing wrong here?
Code: Select all
Loop, Files, %sourcepdf1% , D
{
sourcepdf2 = % A_LoopFileLongPath . bslash . elemname . pdfstar
Loop, Files, %sourcepdf2%
{
If FileExist(A_LoopFileLongPath)
{
Gosub, Fileexistroutine
}
else
{
Gosub, Filenotexistroutine
}
} ;;; end of if fileexist
} ;;; end of loop2
} ;;; end of loop1
Problem is :
Fileexistroutine is launched properly, but "else" is skipped.
I've tried to use If !FileExist(A_LoopFileLongPath) - no result.
Also was trying to use IfExist but this cannot work with "else"