curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

RE: How to delete a file with '&' in its name on SFTP

From: Bill Mercer <>
Date: Fri, 3 May 2019 16:10:36 +0000

>I'm not aware of any reason why '&' would be treated special for SFTP. Does the Windows shell prompt do something special with it?

The Windows shell treats the ampersand as a command separator, like a semicolon in bash.
To escape the ampersand, you need to prefix it with a caret character. Example:

H:\>echo Hello & Goodbye
'Goodbye' is not recognized as an internal or external command,
operable program or batch file.

H:\>Echo Hello ^& Goodbye
Hello & Goodbye

Received on 2019-05-03