Use FileExist() to find file on user's desktop Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Xtendera
Posts: 9
Joined: 06 Jul 2020, 22:29

Use FileExist() to find file on user's desktop

08 Jul 2020, 13:55

Hello, so I am using FileExist() with InStr() to see if a folder exists on the user's desktop. But the problem is that I don't know how to use variables with the FileExist function (In this case "%A_Desktop%"). I have tried the code below:

Code: Select all

if InStr(FileExist(%A_Desktop%"\myFolder"), "D")
but that gives me an error. I also tried the same thing without the slash before "myFolder" but that doesn't work either. Putting the variable name inside the quotes always reroutes to false. Can someone help me? Thank you.
User avatar
flyingDman
Posts: 2823
Joined: 29 Sep 2013, 19:01

Re: Use FileExist() to find file on user's desktop  Topic is solved

08 Jul 2020, 13:58

if InStr(FileExist(A_Desktop "\myFolder"), "D")
14.3 & 1.3.7
User avatar
boiler
Posts: 17107
Joined: 21 Dec 2014, 02:44

Re: Use FileExist() to find file on user's desktop

08 Jul 2020, 13:58

Code: Select all

if InStr(FileExist(A_Desktop "\myFolder"), "D")
Edit: Too slow

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 143 guests