# [BATCH] Input with spaces?



## NoNamed (Dec 22, 2009)

I've always used the 

```
set /p Var=Write something:
```
But it appears, that the batch file stops running when an input with a space is entered. Why is this, and how do i avoid/work around it?


----------



## TheOutcaste (Aug 8, 2007)

Unless being used in an Echo statement, you need to put quotes around the variable when you use it, so change %Var% to "%Var%".

That wold be the most likely problem.

Entering any of the special characters <>()%^&! could cause issues depending on what you are doing with the data.


----------



## Keebellah (Mar 27, 2008)

You could use it together with a vbs script where you could sue an input box that later executes the batch file or even writes it out and executes it for you.

The only thing is that the network (if you're on a network) allows you to execute vbs scripts


----------

