AHK: FileExist Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
inseption86
Posts: 203
Joined: 19 Apr 2018, 00:24

AHK: FileExist

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
aifritz
Posts: 301
Joined: 29 Jul 2018, 11:30
Location: Germany

Re: AHK: FileExist  Topic is solved

03 Mar 2019, 11:56

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
	}
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: AHK: FileExist

04 Mar 2019, 03:51

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.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, RandomBoy and 418 guests