cmder icon indicating copy to clipboard operation
cmder copied to clipboard

Side effect from '&' at Cmder home folder name

Open fvoronin opened this issue 12 years ago • 6 comments

When Cmder home folder name contain '&' symbol, it has side effect on start.

Exec C:\A&B\Cmder.exe and get in console

"C:\A" is not an internal or external command, operable program or batch file. 
The system can not find the path specified.

C:\Users\Batman>|

fvoronin avatar Sep 18 '14 15:09 fvoronin

I believe this is "correct", if unexpected, behaviour.

& actually is the same as ; in bash. You would run two commands with it at once. Did you try putting the path in quotes?

More on this topic in this answer

ccoenen avatar Oct 27 '14 14:10 ccoenen

(confirmed that plain cmd.exe does the same thing without quotes)

C:\Users\test>cd C&D
Das System kann den angegebenen Pfad nicht finden.
Der Befehl "D" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

C:\Users\test>cd "C&D"
Das System kann den angegebenen Pfad nicht finden.

the path does not exist, but the second example at least gives the expected response

ccoenen avatar Oct 27 '14 14:10 ccoenen

The error message appears in the Cmder window on start, when it's located at C:\A&B\ directory. No matter how to start Cmder - from another console with quotes in path, or by double click in Explorer.

fvoronin avatar Oct 27 '14 14:10 fvoronin

Ah sorry, i didn't catch that in the original post.

ccoenen avatar Oct 27 '14 14:10 ccoenen

Tested this with a downloaded mini 1.3.2

@cmderdev/trusted-contributors CMD task chokes on this, powershell is fine. will somebody who knows more than I on batch scripting fix this or add the wontfix label and close if it can't be done.

installed path: C:\temp\cmder&mini\Cmder.exe

'C:\temp\cmder' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.

C:\Users\jbennett>%CMDER_ROOT%
'C:\temp\cmder' is not recognized as an internal or external command,
operable program or batch file.
'mini' is not recognized as an internal or external command,
operable program or batch file.

Jackbennett avatar Jan 25 '17 10:01 Jackbennett

& in batch is a reserved character and should not be used in folder or filenames. I am surprised it was even possie.

We can't fix this.

daxgames avatar Jan 26 '17 02:01 daxgames