multi-word input

April 19, 2011 at 12:29:34
Specs: Windows 7
I need to use a batch file to get the username of the person using the batch file, and i need it to accept multiple words, like a first and last name. Then then ask for a file, and use both inputs to open the file location

what i have so far

set USERNAME=
set /P USERNAME=What is your computer account name:
set INPUT=
set /P INPUT=What file do I open:
start C:\Users\%USERNAME%\%INPUT%

input:
What is your computer account name: John Doe
What file do I open: file name.fil

result:
C:\Users\John\file.

what I want:
C:\Users\John Doe\file name.fil

i know this is long, but i want to give as much detail to help as possible, any solutions?


See More: multi-word input

Report •

#1
April 19, 2011 at 13:47:29

start "" "C:\Users\%USERNAME%\%INPUT%"


Report •

#2
April 19, 2011 at 13:50:13
that did it, thanks for the help

Report •
Related Solutions


Ask Question