answersLogoWhite

0


Best Answer

Yes, but you will need to enclose the string in quotes on both sides of the ==. For example...

@ECHO OFF

SET M=Firstname Surname

IF "%M%"=="Firstname Surname" (ECHO It works!) ELSE ECHO Failure!

PAUSE

EXIT

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: In a batch script is it possible to have a if statement that compares two strings with spaces for example if percent M percent equals equals firstname surname?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

The statement Love's tender arrow is an example of a?

metaphor. It compares love to an arrow, emphasizing the force and impact of emotions.


Example of an statement conjunction statement?

I went to the store AND I bought some milk.


What is a ratio that compares two numbers?

The ratio that compares two numbers is a FRACTION. For example, the ratio of 3:5 can be written as 3/5.


What is an example of a statement that is accepted without proof in geometry?

It is possible to draw a straight line from any point to any other point.


What is an example of striking statement?

"Time is free, but it's priceless. You can't own it, but you can use it. You can't keep it, but you can spend it." - Harvey Mackay


What is a example for statement in a sentence?

An example of a statement in a sentence is "The Earth revolves around the sun." This sentence conveys a fact or opinion and is declarative in nature.


What is a database union?

In SQL (the Structured Query Language), the language used to access databases, a UNION is the joining of several unrelated queries into a single result set. As a trivial example: SELECT FirstName, LastName FROM Contacts UNION SELECT FirstName, LastName FROM Leads In this case, you are looking for all contacts' and leads' first names and last names.


What is mathematical comparison statements?

A comparison statement is just what it sounds like. it compares two or more things in a statement. Example: Hermione is 3 inches shorter than Ron and Luna. or the 3rd hour math class is harder than the 1st and 5th hour math classes. You are probably thinking that this is a comparison statement that should be used in language, not math, but in reality the only difference between the two is the data put into them.


What is an example of a prejudicial statement?

A positive prejudicial statement is a statement that relies on stereotypes, but does not say anything negative about the group. For example, saying Asians are good at math would be a positive prejudicial statement.


What does a parisian french address looks like?

A Parisian French address typically includes the street name, building number, door code or interphone number, floor/étage, and the postal code. In Paris, addresses often follow the format of Street Name, Building Number, Floor/étage (if applicable), Postal Code, Paris. For example: 12 Rue de Rivoli, 5ème étage, 75001 Paris.


What are two numbers that add up to 44?

It is a mathematical statement with infinitely many possible solutions:For example, 1 + 43 or 1.23 + 42.77


A particular example or instance of a statement that makes a statement false?

Counterexample