Copy and rename .filename

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.
User avatar
SvA
Posts: 486
Joined: 29 Mar 2006, 02:41
Location: DE

Copy and rename .filename

Post by SvA »

Hello everybody,

I just tried to copy a file named inputrc to the other panel (using F5 copy command), renaming it to .inputrc while copying (note the added leading dot). To do this, I altered the \*.* suffix suggested by AS to \.*
This gave me the error message:

Name: <path of target panel>
Error: (3) The System cannot find the specified path.
(translated form German)

Is there a way I can do this using the asterisk rather than retyping the name?

(\.*.* does not work either nor does \.*.)

I cannot do it with console (cmd.exe) copy command either. I get error Access denied there, even though I do have the right to replace the file that is there already.
User avatar
Ether
Posts: 1471
Joined: 10 May 2007, 16:08
Location: Czech Republic
Contact:

Re: Copy and rename .filename

Post by Ether »

I think the errors are showing because the rename masks expand to empty string or a dot (try renaming a file with extension using this mask), which is of course an invalid name for a file (actually it's the name of the parent directory and the link to it, respectively). I would recommend copying the file as is and then renaming it in place.

Example:
C:\yourdirectory\.*
applied to
inputrc
could yield
C:\yourdirectory\
or
C:\yourdirectory\.
which are both valid pathnames, but not for a file
Ελληνικά rulez.
User avatar
SvA
Posts: 486
Joined: 29 Mar 2006, 02:41
Location: DE

Re: Copy and rename .filename

Post by SvA »

Yes, Ether, that's what probably happens, but why should it with any but possibly the first attempt?

I experimented on the command line with a file named test.txt and found, that the first asterisks after any dot in the destination file pattern is expanded to the extension, after a second dot it is expanded to the empty string. So, Windows is broken in this regard. You cannot introduce a dot in the filename part while using an asterisk in the filename part.

It is probably not wise to attempt to change this for consistency's sake, but it would help, if Salamander presented the file name instead of the *.* match all pattern in case only one file is copied.
User avatar
Ether
Posts: 1471
Joined: 10 May 2007, 16:08
Location: Czech Republic
Contact:

Re: Copy and rename .filename

Post by Ether »

SvA wrote:it would help, if Salamander presented the file name instead of the *.* match all pattern in case only one file is copied
I like that idea.
I hope that, one day, Windows adopts parts of the POSIX standard and finally gets rid of drive letters, backslashes, *.* masks and all that DOS stuff.
Ελληνικά rulez.
Post Reply