-Paste file in folder with trailing space in name

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
white
Power Member
Power Member
Posts: 5815
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

-Paste file in folder with trailing space in name

Post by *white »

Bug also in TC 8.01

* create folder "test"
* Use Shift+F6 to rename folder "test" into "test \"
* Select a file and press Ctrl+C (copy file)
* Go to folder "test " and press Ctrl+V (paste file)
* Now the file is copied to folder "test " OK, but also folder "test" is created
* Go to folder "test " and press Ctrl+V (paste file) again
* Now the file is copied to folder "test" not "test "


Tested using Windows XP. Explorer also automatically creates folder "test", but never puts the pasted file in this folder.
Last edited by white on 2013-11-27, 22:24 UTC, edited 1 time in total.
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3379
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

the only bug here is that tc doesnt changes "test \" to "test\"...
Hoecker sie sind raus!
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6975
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

I'm wondering why peoble try to create problems by adding traling spaces to names. Thats useless and gives many problems.
I suggest that TC just ignores such spaces.
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

Horst.Epp wrote:I'm wondering why peoble try to create problems by adding traling spaces to names.
Many times this happens by accident. I frequently press \ by mistake as my hand reaches to press ENTER... This can happen with space too. I agree with Sir_SiLvA though:
Sir_SiLvA wrote:the only bug here is that tc doesnt changes "test " to "test"...
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Ctrl+C/Ctrl+V is Explorer (OLE2) - and it does NOT support trailing spaces. Nothing I can do, sorry.
Author of Total Commander
https://www.ghisler.com
siealex
Senior Member
Senior Member
Posts: 304
Joined: 2009-03-22, 16:36 UTC

Post by *siealex »

Windows does not support trailing spaces at all. The best decision would be to deny using them completely.
We are not so S.M.A.R.T. as we imagine...
User avatar
white
Power Member
Power Member
Posts: 5815
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

http://support.microsoft.com/kb/315688/en wrote:Folders or files that contain leading or trailing spaces are acceptable in NTFS; however, these files are not acceptable in the Win32 subsystem. Therefore, neither Windows Explorer nor a command prompt can reliably handle files that have leading or trailing spaces.
Fact is that file and folder names with trailing spaces can and do exist on NTFS partitions. They can be created by hackers, viruses, buggy programs, the user, other systems like a Mac client. The user could also be accessing a NTFS drive from whatever device not using Windows. Why shouldn't there be trailing spaces. I expect a filemanager to perform file management operations like copying, deleting, renaming and moving on NTFS drives as good as it possibly can.

By the way. On Windows XP's command prompt I can create a folder with trailing spaces like this: md "folder "
Post Reply