Charles Dye
Super Moderator
- May
- 5,387
- 166
Staff member
I'm cleaning up one of the file servers this week, and have to cope with numerous files with blatantly illegal filenames. (Damn Mac users.) And to my chagrin, I'm having to use CMD.EXE to fix them.
Take, for instance, "12340_contents.pdf " (that's 82 spaces on the end -- I swear I'm not making this up!) Neither TCC nor CMD.EXE can cope with this, of course. Using CMD.EXE, I can delete the monster using its short filename, 12340_~2.PDF. In TCC, this doesn't work. It appears that TCC thoughtfully converts the SFN back to the corresponding (illegal) long filename, so I either get an error message or else whack the wrong file.
I had thought that turning on Win32SFNSearch would allow using short filenames for file management, but apparently not. Is this the intended behavior? Is there any way to disable this feature (automatically converting SFNs to LFNs behind the scenes)? I can see why it would be desirable 99% of the time, but when it comes to illegal filenames, it can definitely be a Bad Thing (deleting or renaming the wrong file/subdirectory.)
On a different topic, but related to the same cleanup chore: What's the maximum filename length in v12? HELP LIMITATIONS has it at 4K, but I was under the vague (wrong?) impression that that had been increased a major version or two back. (Multi-sentence subdirectory names, nested twelve deep; don't ask me, I don't know.)
Take, for instance, "12340_contents.pdf " (that's 82 spaces on the end -- I swear I'm not making this up!) Neither TCC nor CMD.EXE can cope with this, of course. Using CMD.EXE, I can delete the monster using its short filename, 12340_~2.PDF. In TCC, this doesn't work. It appears that TCC thoughtfully converts the SFN back to the corresponding (illegal) long filename, so I either get an error message or else whack the wrong file.
I had thought that turning on Win32SFNSearch would allow using short filenames for file management, but apparently not. Is this the intended behavior? Is there any way to disable this feature (automatically converting SFNs to LFNs behind the scenes)? I can see why it would be desirable 99% of the time, but when it comes to illegal filenames, it can definitely be a Bad Thing (deleting or renaming the wrong file/subdirectory.)
On a different topic, but related to the same cleanup chore: What's the maximum filename length in v12? HELP LIMITATIONS has it at 4K, but I was under the vague (wrong?) impression that that had been increased a major version or two back. (Multi-sentence subdirectory names, nested twelve deep; don't ask me, I don't know.)