This can be done using Visual Basic scripting:
1.Create a batch file with the following line:
wscript string.vbs
2.Create a new txt file:
string.txt
3.Rename string.txt to string.vbs
4.Enter the following lines in the vbs file:
Dim x
Dim s
x=inputbox("enter address:")
s = replace(x," ","")
x=s+".txt"
Msgbox(x)
5. Execute the batch file:
x will be the filename adress.txt
If you enter 'my new documents' when prompted for address:
x will be mynewdocuments.txt