shornw Posted May 25, 2006 Share Posted May 25, 2006 any ideas anyone......I want to look for a specific file using @windowsdir. I know the file exists (test conditions) but if I use the following it reorts that the file does not existIf FileExists(@windowsdir & "filename") then MsgBox(4096, "exists", "file Exists")Else MsgBox(4096, "no exist", "file does NOT exist")EndIfhowever it works fine if I path it directly ieIf FileExists("C:\windows\filename") thenI really cant see whats wrong here, probably my inexperience (read stupidity) [font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font] Link to comment Share on other sites More sharing options...
MHz Posted May 25, 2006 Share Posted May 25, 2006 (edited) any ideas anyone......I want to look for a specific file using @windowsdir. I know the file exists (test conditions) but if I use the following it reorts that the file does not existIf FileExists(@windowsdir & "\filename") then MsgBox(4096, "exists", "file Exists")Else MsgBox(4096, "no exist", "file does NOT exist")EndIfhowever it works fine if I path it directly ieIf FileExists("C:\windows\filename") thenI really cant see whats wrong here, probably my inexperience (read stupidity)Edit: Add the backslash as shown, and the quote too. Edited May 25, 2006 by MHz Link to comment Share on other sites More sharing options...
shornw Posted May 25, 2006 Author Share Posted May 25, 2006 its just sooooooo easy when you know........ Thanks MHz...once again you save my hair from being torn out [font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now