var A - will have a file name such as 0000462 J&J MSD CONS PHARM 07 2010.xls
var B - will be the same file name
Windows automatically makes var B appear as 0000462 J&J MSD CONS PHARM 07 2010~1.xls
Thus the comparison does not work. Any ideas would be much appreciated. I was looking at the contains method but cannot find anything. The file name above is just an example and the number of characters prior to the ".xls" will vary a lot.