Trailing spaces are trimmed during Rename

Discussion related to "Everything" 1.5 Alpha.
Post Reply
froggie
Posts: 300
Joined: Wed Jun 12, 2013 10:43 pm

Trailing spaces are trimmed during Rename

Post by froggie »

Select a file such as TEST .txt.
Press F2
File is renamed to TEST.txt
Any spaces added at the end of the file name are immediately removed.

Windows Explorer allows these spaces as part of the file name.
void
Developer
Posts: 16671
Joined: Fri Oct 16, 2009 11:31 pm

Re: Trailing spaces are trimmed during Rename

Post by void »

Thank you for the issue report froggie,

Are you adding trailing spaces as part of your work flow?
I'm trying to understand where you would want the trailing space..



Windows Explorer will trim spaces from the start and end of the stem when Folder Options -> View -> Hide extensions for known file types is enabled.
Otherwise, Windows Explorer will trim spaces from the start and end of the full filename. (not before the extension)

Everything shows file extensions by default.
Windows Explorer hides file extensions by default.



There's quite a few requests from users to trim the spaces.



Should Everything only trim the spaces from pasted text?

Is the trimming of the trailing space unexpected when you press F2, don't change any text and press ENTER?



To add a space to the start or end of the filename:
  • Select the file/folder and press Shift + F2.
  • Add your space to the new format.
  • Click OK.


To disable the trimming of starting and trailing spaces:
  • Copy and paste the following into your Everything search box:
    /rename_trim=0
  • Press ENTER in your Everything search box.
  • If successful, rename_trim=0 is shown in the status bar for a few seconds.
rename_trim
froggie
Posts: 300
Joined: Wed Jun 12, 2013 10:43 pm

Re: Trailing spaces are trimmed during Rename

Post by froggie »

Thank you for your quick and complete reply.

rename_trim=0 works very well for me.

To answer your questions:
Are you adding trailing spaces as part of your work flow?
Yes. When I want to replace an existing file that has a long name with another file, I often add a space to the end of the name, copy the name, paste the came to the new file (deleting the space) and then delete the old file.
Windows Explorer will trim spaces from the start and end of the stem when Folder Options -> View -> Hide extensions for known file types is enabled.
Otherwise, Windows Explorer will trim spaces from the start and end of the full filename. (not before the extension)
Windows Explorer hides file extensions by default.
Interesting. I did not know that. I have been setting Windows not to hide extensions since that option first appeared. It is far too confusing to me to not see the extensions
There's quite a few requests from users to trim the spaces.
Should Everything only trim the spaces from pasted text?
Is the trimming of the trailing space unexpected when you press F2, don't change any text and press ENTER?
Yes it was unexpected, but maybe some people use that as a feature. I would not vote to change anything here, as I am going to use rename_trim=0 from now on.

Also, although the documentation for F2, single click, etc. calls this Rename I use it far more often to just copy the file name for various purposes -- far fewer key strokes than doing so from the context menu. It is really more an Enable Edit.
Post Reply