BATCH: How to echo string containing '&' char to a file

I'm trying to write to a file a URL string that has the '&' char in it (using simple 'echo'), problem is that it's a saved char in the command prompt so it fails.

Is there any way to tell the command prompt that it's part of the string.

Example:

echo www.google.com/search=make&peace > love.txt

I'll get an error indicating that "peace" is not a recognized command.

Thanks!

Answers


cmd uses ^ as the escape character, so

echo www.google.com/search=make^&peace > love.txt

Need Your Help

Using dropzone.js in asp.net

c# javascript jquery asp.net

Since few days i m trying to implement multiple file upload with drag and drop interface.

Mule outbound http end point Content-Length mismatch

mule endpoint

I am trying to do a basic GET/POST from one REST client to another. I'm getting and mapping the data just fine, but it times out during the POST http oubound endpoint. In using Fiddler Web Debugg...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.