On 2/12/2018 11:41, Bo Berglund wrote:
On Mon, 12 Feb 2018 15:54:00 +0000, Philip Martin
<phi...@codematters.co.uk> wrote:

'&' has special meaning to the shell and needs to be quoted or escaped.
I always thought that this was the case only for Linux, since & is a
perfectly valid part of a file name on Windows...
But I will refrain from such characters in paths in the future.


& is valid for a filename on Linux too, but it also needs to be escaped there... if you run "help cmd" in Windows, it says at the end:

The special characters that require quotes are:
     <space>
     &()[]{}^=;!'+,`~

The & in Windows is a command separator, basically like ";" in Unix-style shells. So

svn add Fasadändring&Attefalltillbyggnad.pdf

Is interpreted as "svn add Fasadändring" followed by "Attefalltillbyggnad.pdf". The first results 
in "svn: warning: W155010: 'D:\Bosse\Fasadändring' not found", and the second results in 
"'Attefalltillbyggnad.pdf' is not recognized as an internal or external command, operable program or batch 
file."

Also, "^" is the escape character for cmd.exe (like "\" in Unix shells), so as 
an alternative to quoting the filename, you can do:

svn add Fasadändring^&Attefalltillbyggnad.pdf

--
Name: Dave Huang         |  Mammal, mammal / their names are called /
INet: k...@azeotrope.org |  they raise a paw / the bat, the cat /
Telegram: @dahanc        |  dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 41 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++

Reply via email to