Solved Batch: Multiple Words for set /p

March 27, 2015 at 10:36:13
Specs: Windows 64
I am trying to get something like this to work.
set /p T=-:
When T can be " Hello World "
Or " Anything with spaces"
That batch will execute or call upon without "X"

call %T%
If %T% is a batch file it will call it without a problem. But if it's a batch file with space, it needs the "Hello world.bat" Quotes around it.

Can someone explain How I can get around this without having to
Call "%T%"
Because that ruins the call for basic windows command lines like Diskpart or cls

See More: Batch: Multiple Words for set /p

Report •

March 29, 2015 at 21:07:27
✔ Best Answer
Found the solution.
When it calls a batch file . . . .
echo Hello
if %1==World echo World

Were %1 is the second word after the space as in
Hello %1

Report •
Related Solutions

Ask Question