I would have tried your link that used Administrative Tools, and Services for Network File System, except that the drive is mapped on a LAN and i expected that to cause more trouble than I could solve!
The file system method is perfect, but I wonder - should i call it once - then use the result, or call it individually for each file? Or does it matter ? Speed isn't important.
I would send in the filename to the function and return true or false (adding that logic to the function); or get the output, split it on BR, Filter the array, and use Strcomp on the result. Does either way stand out as best ?