Where's the blog been? Well, I've been busy so the blog's not. But I thought I'd share the kind of thing I'm having to deal with in my busy days.

I'm copying files from one place to another in VB 6, where that other place is determined by the user. Simple enough, and here's the code to take the original file (and there are many so I'm doing this as generic as possible. I'm cycling through the files collection with the FileSystemObject and recursively calling the sub when I hit a folder) and get the new file position:

strNewFile = Replace(fileItem.Path, strOldPath, strNewPath)

Here's the glitch. On Windows NT, 2k, and XP, we're happy as pigs in mud. On Windows 98, we end up blasting the original file. Quick, first person to get the answer gets a quarter!

That's right, I'm pulling the path from an actual File object, and in Windows 98 a file's path, due to some DOS interaction, I imagine, has capital letters all over. When I try to replace, I'm doing a binary replace by default, and that makes "a" (97 decimal) and "A" (65 decimal) very different.

Here's some evidence from the Immediate Window in VB 6:
? Replace("first", "FIR", "tree")
? Replace("first", "FIR", "tree", , , vbTextCompare)

For heaven's sake. Note that I'm not upset with the Replace function -- it does great. But I am a little put off by Windows 98's integration with its file system. The user interface and the plumbing underneath just don't do well together. Note that, since I didn't make myself clear above, that the Windows UI (eg, the File Explorer) displays these file names with lowercase letters. So a file like, "C:\camelNotation\anotherCamel\fileName.txt" comes up as "C:\CAMELNOTATION\ANOTHERCAMEL\fileName.txt" with the File object for some reason that must be related to MS's plan to lay Win32 over legacy DOS code.

Put that together with the fact that I just "won" a laptop at eBay that will have a hard time running anything other than Windows 95 (thought it'd be a fun VB test box)... but that's another blog. "The myth of the $100 laptop." I think you can see where I'm headed. :^)