[nSLUG] Removing spaces from file names - note, long lines
George N. White III
gnwiii at gmail.com
Thu Nov 13 10:49:31 AST 2014
On Wed, Nov 12, 2014 at 10:41 PM, Hatem Nassrat <hnassrat at gmail.com> wrote:
> Hi Vlado,
> On Wed Nov 12 2014 at 10:32:22 PM Vlado Keselj <vlado at dnlp.ca> wrote:
>> This one-liner does not do the same operation. My main goal was
>> to turn one or any chosen filenames that look like:
>> Joe, Jack & Jane's document (version # 1) [draft].doc
>> into something like:
> Saw your perl, honestly didn't mentally fully compile it, but it seems
> like it would do the transformation as described. What is the reasoning /
> requirements for the use of this kind of transformation, is it so you can
> revert back to the original name?
It might be useful to mention the possibility of replacing the file name
with the inode number or (as in git) SHA-1 hashes. You can keep a
database to associate all sorts of metadata with inode numbers or hashes,
including "original_name", "8dot3_name", "ascii_name", "UTF-8_name", etc.
Many years ago mainframes were limited to short filenames and about 64
characters (uppercase, numbers, and a few punctuation symbols). Libraries
to support ASCII names began to appear, so you could live in an "ASCII"
namespace while the system used simple names. This did require a translation
tool to figure out the ASCII version of a name mentioned in system logs.
In many environments it would be helpful to allow the filenames visible to
users change with the locale.
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nSLUG