in reply to Re^2: AWTDI: Renaming files using regexp
in thread AWTDI: Renaming files using regexp
I admit, I was using the traditional definition which doesn't apply to *ix. So let's discuss this modern definition, one where file extentions are can be specific to any of file systems, operating systems and applications.
Applications need a way of knowing if an extention was supplied. For example, it needs to know that to decide whether it should add the default extention. I can think of two ways:
The first solution has two problems: 1) It's slow, and 2) it requires that all extentions be registered.
The second solution might be wrong on rare occasions, but it doesn't have the problems of the first solution. The catch is that it must restrict the characters that can be present in extentions. Most file names with non-extention dots have spaces following their dots, so the simplest restriction is to forbid spaces in exentions. This prevents applications from thinking file "This is private. Don't read" has an extention.
Therefore, my recommendations is to disallow spaces in extentions, even if the underlying OS or file system doesn't impose such a restriction.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: AWTDI: Renaming files using regexp
by duff (Parson) on Apr 11, 2006 at 18:50 UTC | |
by ikegami (Patriarch) on Apr 11, 2006 at 19:49 UTC |