How-to: Leading or Trailing Space or Dot issues

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Michael REMY
Senior Member
Senior Member
Posts: 202
Joined: 2010-12-12, 10:05 UTC
Location: Amiens

How-to: Leading or Trailing Space or Dot issues

Post by *Michael REMY »

leading space is not rightly handled while editing

hi,

i already notice you of this bug in the past, but someone told me it was not a bug but a bad human attitude error. i'll do it again because it 's boring me again , even in TC8.51a on win7 x64.

when you edit the name of a directory, and (by mistake) let a space at this end, then TC remove auto this leading space character. that is good.

but when you o the same thing with a file name, then TC let the leading space character. that is wrong

i search a long time, but i don't know why people will let a leading space in any name of file or folder, no useness example in real life.

have a good day

Mike
Last edited by Michael REMY on 2015-02-18, 09:34 UTC, edited 1 time in total.
i'm an old long user of TC since the windows 3.11 release !, for the history, i came to tc when i migrate from amiga commodore to PC where they are diskmanager and directory opus there.
User avatar
HolgerK
Power Member
Power Member
Posts: 5412
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: leading space is not rightly handled while editing

Post by *HolgerK »

Michael REMY wrote:when you edit the name of a directory, and (by mistake) let a space at this and, then TC remove auto this leading space character.
Not confirmed.

Did you mean a Space character at the end of the directory or filename?
A space behind the last charcater of the directory entry is always removed.
Keep in mind that the characters of a directory entry includes the extension.
In "Name<Space>.Ext" the space will not be removed.
But in "Name.Ext<Space>" the space will be removed.

Regards
Holger
Michael REMY
Senior Member
Senior Member
Posts: 202
Joined: 2010-12-12, 10:05 UTC
Location: Amiens

Re: leading space is not rightly handled while editing

Post by *Michael REMY »

HolgerK wrote:
Michael REMY wrote:when you edit the name of a directory, and (by mistake) let a space at this and, then TC remove auto this leading space character.
Not confirmed.

Did you mean a Space character at the end of the directory or filename?
A space behind the last charcater of the directory entry is always removed.
Keep in mind that the characters of a directory entry includes the extension.
In "Name<Space>.Ext" the space will not be removed.
But in "Name.Ext<Space>" the space will be removed.

Regards
Holger
yes, in the end (not the and, sorry for my syntaxe).

why TC does want to remove the space before the last dot (the one from the exension), there is no sens to have <name><space><dot><whatever>
i'm an old long user of TC since the windows 3.11 release !, for the history, i came to tc when i migrate from amiga commodore to PC where they are diskmanager and directory opus there.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7024
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

<name><space><dot><ext>
is a total legal name and brings no problems at all.
So why should TC remove it ?
User avatar
HolgerK
Power Member
Power Member
Posts: 5412
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: leading space is not rightly handled while editing

Post by *HolgerK »

Michael REMY wrote:why TC does want to remove the space before the last dot (the one from the exension), there is no sens to have <name><space><dot><whatever>
A trailing <dot> or <space> character is automatically removed at the end of the file or directory name because this is not allowed in Win32 File Namespace (same behavior as in Explorer).
Anyway, you can create such names in NT Namespace (e.g. "\\?\c:\path_to_file_that contains a trailing space.txt " but may have difficulties to handle (copy, delete, rename,..) such files or directories.

If it does not make any sense for you, just don't create such base file names.
Or you should make a suggestion to (optionally) enhance the rename functionality like:
Automatically replace invalid or disturbing characters like "space" with "underscore", "question mark" with "exclamation mark", asterics with 'x', ...

Regards
Holger
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Trailing space is not removed? Why?

Post by *Stefan2 »

Michael REMY wrote: i search a long time, but i don't know why people will let a leading space in any name of file or folder, no useness example in real life.

That trailing space "<base name><space>.<ext>" if often just a remainder of a wrongly renaming,
while wanting to remove the last part of a base name, but forget to include to remove the space too.

My download (ZDR).exe
My download  .exe




Or it may be just left over after a renaming for to add another string later on,
and that way having a easy "jump mark" for an Ctrl+ArrowLeft command.

My file name New.doc
My file name  .doc
My file name Project X.doc



So it's up to the user what to remove or what not.


And as others already mentioned: trailing space is not allowed by file system, where as leading space is allowed. (same for the period/dot)
But then it is often the "smartness" of tools who handles this cases for the user..... for good or bad, depending on users skill and what they want.


More info:
Microsoft: Naming Files, Paths, and Namespaces
http://en.wikipedia.org/wiki/Filename

 
Post Reply