What exactly is this line of code doing in vb6?
If StrConv(Dir(FilePath & strArray(ArrayCounter)), vbUpperCase) <> StrConv(strArray(ArrayCounter), vbUpperCase)
It seems like its comparing the exact same thing here…
Filepath is just a string with a directory name in it
It’s testing for the existence of the file strArray(ArrayCounter) in the directory FilePath.
If the file exists, Dir will return the filename without the path, and the comparison will succeed.
If the file doesn’t exist, Dir will return an empty string, and the comparison will fail.
If strArray(ArrayCounter) contains a wildcard character, the result of the Dir function will be the first matching filename, and the comparison will fail.
The MSDN documentation for the Dir function covers this, and you can also see what’s happening quite easily by running the code with the VB6 debugger (or VBA debugger if you don’t have VB6).