Can place spaces at begin of file or folder name

Discussion of bugs and problems found in Altap Salamander. In your reports, please be as descriptive as possible, and report one incident per report. Do not post crash reports here, send us the generated bug report by email instead, please.
Pasha T.
Posts: 14
Joined: 14 Apr 2009, 20:51

Can place spaces at begin of file or folder name

Post by Pasha T. » 08 Nov 2010, 00:43

Can place spaces at begin of file or folder name.
For example i can rename file "File.txt" to " File.txt" (one space) or " File.txt" (two spaces).

Other question:
hoc i can find files and folders with spaces at begin of its names?

User avatar
SelfMan
Posts: 961
Joined: 05 Apr 2006, 20:51
Contact:

Re: Can place spaces at begin of file or folder name

Post by SelfMan » 08 Nov 2010, 05:28

Even windows explorer strips the spaces in the front of the filename.
If you can find files with spaces in the front, then they are created by some programs.
You have to learn to live with it.

Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5196
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Can place spaces at begin of file or folder name

Post by Jan Rysavy » 08 Nov 2010, 09:49

Pasha T. wrote:Can place spaces at begin of file or folder name.
For example i can rename file "File.txt" to " File.txt" (one space) or " File.txt" (two spaces).
You cannot with Altap Salamander. Spaces will be stripped.

If you can, there is something wrong and let us know more details please...

Pasha T.
Posts: 14
Joined: 14 Apr 2009, 20:51

Re: Can place spaces at begin of file or folder name

Post by Pasha T. » 08 Nov 2010, 10:37

Use F2 (Rename function) and place space at begin.

http://www.youtube.com/watch?v=-31A4Dv_uPU

Pasha T.
Posts: 14
Joined: 14 Apr 2009, 20:51

Re: Can place spaces at begin of file or folder name

Post by Pasha T. » 08 Nov 2010, 10:42

When move file with spaces at begin of name - Explorer delete spaces without prompting.I think need to add this function to Salamander.

Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5196
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Can place spaces at begin of file or folder name

Post by Jan Rysavy » 08 Nov 2010, 10:51

Nice :)

We will fix it, thank you!

therube
Posts: 627
Joined: 14 Dec 2006, 06:22

Re: Can place spaces at begin of file or folder name

Post by therube » 08 Nov 2010, 16:17

There may not be anything inherently wrong with spaces at the beginning of a file name?

Naming Files, Paths, and Namespaces

(I have no idea as to time frame of that article.)

Even from DOS you can create file names beginning with spaces.

Code: Select all

C:\TMP>DIR "  R*"

 Directory of C:\TMP\

10/31/2010  12:56 PM            42,092   REAL.rents.1011
               1 File(s)         42,092 bytes
               0 Dir(s)     734,060,544 bytes free

C:\TMP>REN "  REAL.RENTS.1011" " REAL.RENTS.1011"

C:\TMP>DIR > XXX

C:\TMP>DIR
 Directory of C:\TMP

11/08/2010  10:03 AM    <DIR>          .
11/08/2010  10:03 AM    <DIR>          ..
10/31/2010  12:56 PM            42,092  REAL.RENTS.1011
11/08/2010  10:03 AM               381 XXX
               2 File(s)         42,473 bytes
               2 Dir(s)     733,990,912 bytes free


C:\TMP>dir > "   xxx"


C:\TMP>dir

 Directory of C:\TMP

11/08/2010  10:10 AM    <DIR>          .
11/08/2010  10:10 AM    <DIR>          ..
11/08/2010  10:10 AM               428    xxx
10/31/2010  12:56 PM            42,092  REAL.RENTS.1011
11/08/2010  10:03 AM               381 XXX
               3 File(s)         42,901 bytes
               2 Dir(s)     733,548,544 bytes free

C:\TMP>
Not saying you necessarily want the ability to have spaces at the beginning of a file name, but ...
WinXP Pro SP3 or Win7 x86 | SS 2.54

User avatar
Ether
Posts: 1459
Joined: 10 May 2007, 16:08
Location: Czech Republic
Contact:

Re: Can place spaces at begin of file or folder name

Post by Ether » 08 Nov 2010, 21:57

therube wrote:There may not be anything inherently wrong with spaces at the beginning of a file name?
It's slightly more wrong than placing a space inside the name. Use of spaces inside the filename causes issues with command line interfaces, but that is mostly past us(*). On the other hand, all serious filename input fields are filtered for spaces at the both ends of the name, so that a random trailing (or preceding) space won't cause an error - the reason is hard to spot (because spaces are...ehm... whitespace, and therefore not visible). Therefore filenames with spaces on either end are unaccessible under some circumstances and therefore they're wrong.

*) I'm talking about Windows. Because of extensive usage of CLI on *nixes, it's customary to avoid any spaces in filenames there.
Ελληνικά rulez.

Petr Solin
ALTAP Staff
ALTAP Staff
Posts: 1110
Joined: 08 Dec 2005, 09:13
Location: Novy Bor, Czech Republic
Contact:

Re: Can place spaces at begin of file or folder name

Post by Petr Solin » 07 Jun 2012, 14:06

Fixed. You cannot rename file or directory to name with space at the beginning or space or dot at end.

Moreover we have supported operations with directories with spaces or dots at end of name. Such names are not supported by Windows Explorer, but unfortunately they can exist on Windows file system (e.g. "test " or "test..."). Even directory with name " " (just one space character) can exist. You will be able to copy, move, rename, and delete them and change their attributes in Altap Salamander 3.0. Drag&drop is blocked on these paths (Windows Explorer provides data objects for drag&drop and it does not support such names). Context menu for such names is also partially blocked, it is not working properly in all situations (again context menu is service of Windows Explorer which does not support such names).

Salamander 3.0 rejects to create such dangerous names. It's not possible to create such directory with Create Directory command nor when specified as new directory in target path of Copy, Move, or Unpack operations.

File names can also end with space or dot. Then they are inaccessible for the most of applications, Salamander 3.0 rejects common operations with such files. If you have not disabled short names on your file system, you can rename or delete such file in Salamander 3.0.

User avatar
Ether
Posts: 1459
Joined: 10 May 2007, 16:08
Location: Czech Republic
Contact:

Re: Can place spaces at begin of file or folder name

Post by Ether » 07 Jun 2012, 16:37

Thanks. What happens if I have disabled 8.3 filenames?
Ελληνικά rulez.

Petr Solin
ALTAP Staff
ALTAP Staff
Posts: 1110
Joined: 08 Dec 2005, 09:13
Location: Novy Bor, Czech Republic
Contact:

Re: Can place spaces at begin of file or folder name

Post by Petr Solin » 07 Jun 2012, 23:12

All operations with directories work. Files which names are ending with space or dot are inaccessible from Salamander. We can solve it later if someone will have troubles with it.

XavierB
Posts: 1
Joined: 14 Mar 2014, 14:03

Re: Can place spaces at begin of file or folder name

Post by XavierB » 14 Mar 2014, 14:12

Well that's a shame... I suppose it's OK for Salamander v3 to strip spaces from filenames by default, but why can't we have an option to allow those characters if we want to? I for one use leading spaces in filenames as a way to force important files (" ReadMe.txt" for example) to show at the top.

Also, when v3 copies files with a leading (or trailing) space to another directory it strips the leading space(s) from the filename. I don't think it's the right thing to do - I would expect Salamander to copy everything exactly as it is.

Petr Solin
ALTAP Staff
ALTAP Staff
Posts: 1110
Joined: 08 Dec 2005, 09:13
Location: Novy Bor, Czech Republic
Contact:

Re: Can place spaces at begin of file or folder name

Post by Petr Solin » 16 Oct 2015, 12:35

Files and directories should be copied with the same name when you use operation mask *.* (it is default). I have tested this and it seems working well. If it is not working for you properly, please let me know, we should fix it. Thanks!

Post Reply