I have created a Do While Loop to loop through files with .jpg extensions so as to spot on the first one using such a code
fn = Dir(sPath & "*.jpg")
Do While fn <> ""
sFile = sPath & fn
Exit Do
fn = Dir
Loop
And later in the code, I have put a line that checks if the file exists or not, so I used FileSystemObject like that
Set fso = CreateObject("Scripting.FileSystemObject")
Debug.Print fso.FileExists(sFile)
But I got False as a result in the immediate window, although I expect to return True
The file path looks like that C:\Users\Future\Desktop\Screenshot_2022-06-08-21-25-36-252_com.unicostudio.jpg
