Page 1 of 1

AHK: FileExist

Posted: 03 Mar 2019, 10:47
by inseption86
Hi guys, is it possible to make the check on all "xlsx", except for files with the existing "........ yes ..... xlsx"

Code: Select all

If FileExist(A_Desktop "\*.xlsx") 
   {
TrayTip,, !!!!
sleep 2000
} 
return

Re: AHK: FileExist  Topic is solved

Posted: 03 Mar 2019, 11:56
by aifritz
I think it does not work with fileexist.

Here an other approach:

Code: Select all

Loop, % A_Desktop "\*.xlsx"
	{
		If InStr(A_LoopFileName, "yes")
			continue
		ToolTip % A_LoopFileName
		Sleep 2000
	}

Re: AHK: FileExist

Posted: 04 Mar 2019, 03:51
by SOTE
inseption86 wrote:
03 Mar 2019, 10:47
Hi guys, is it possible to make the check on all "xlsx", except for files with the existing "........ yes ..... xlsx"

Code: Select all

If FileExist(A_Desktop "\*.xlsx") 
   {
TrayTip,, !!!!
sleep 2000
} 
return
I'm confused by what you are asking. It seems like you want If !FileExist(A_Desktop "\*.xlsx") , as in add "!", to see if .xlsx does not exist. You can be more specific, and put the name of the file to check if it doesn't exist.