To compare two filenames(blogs.msdn.com)

submitted by schalkvanwykschalkvanwyk(1335) 3 years, 8 months ago

Back in VB land I was making two different calls into some framework, and each call gave me back a filename, and I needed to judge whether the two results were talking about the same file. But how? The framework docs didn't give any guarantee that they'd give back filenames in the same format. What if one call returned long filenames and the other returned it with different casing? or 8.3 format? Or UNC? Or long UNC? The following function is the best I could come up with. I think it only makes sense to compare filenames if they point to an existing file. And I called the function "DidFileNamesPointToSameFile", in the past tense, because by the time the function returns then they might no longer point to the same file anymore!

add a comment |category: |Views: 9

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story