barx Well-Known Member Licensed User Longtime User Dec 26, 2013 #1 Is it possible to use a full path (including filename) for file operations that expect (Dir, Filename)? I kind of tested with Code: Copy File.Exists("", Path) And got a Return value of True. Just making sure this is a reliable possibility. Thank you for your work Sorry for my bad english.
Is it possible to use a full path (including filename) for file operations that expect (Dir, Filename)? I kind of tested with Code: Copy File.Exists("", Path) And got a Return value of True. Just making sure this is a reliable possibility. Thank you for your work Sorry for my bad english.
M Mahares Expert Licensed User Longtime User Dec 26, 2013 #2 I tried the two below variants and it found it each time. I hope this is what you are after: Code: Copy Dim MyFile As String=File.DirRootExternal & "/myfolder/" & "Base_Settings.tab" If File.Exists("",MyFile) Then Msgbox("I found it: " & MyFile,"") Else Msgbox("not found","") End If Code: Copy Dim MyFile As String= "Base_Settings.tab" If File.Exists(File.DirRootExternal & "/myfolder" ,MyFile) Then Msgbox("I found it: " & MyFile,"") Else Msgbox("not found","") End If Upvote 0
I tried the two below variants and it found it each time. I hope this is what you are after: Code: Copy Dim MyFile As String=File.DirRootExternal & "/myfolder/" & "Base_Settings.tab" If File.Exists("",MyFile) Then Msgbox("I found it: " & MyFile,"") Else Msgbox("not found","") End If Code: Copy Dim MyFile As String= "Base_Settings.tab" If File.Exists(File.DirRootExternal & "/myfolder" ,MyFile) Then Msgbox("I found it: " & MyFile,"") Else Msgbox("not found","") End If