Hello; first off I'm a system's administrator. I know NT shell, but only very basic VBS.
What I am trying to do is create a VBS with a input box; then take the variable and pass it to a command line.
All of this works just fine, expect when my variable has a space character.
The basic framework I have is:
attach = InputBox("Enter attachment file name:")
MsgBox("Filename=" & attach)
Set objShell = CreateObject("WScript.shell")
objShell.Run ("my command -attach" & attach)
Now suppose the variable "attach" has a space; lets say the value is "my document.txt". The proper way to run my commmnad line would be:
-attach "my document.txt"
How do I do this in VBS?
Thanks.
What I am trying to do is create a VBS with a input box; then take the variable and pass it to a command line.
All of this works just fine, expect when my variable has a space character.
The basic framework I have is:
attach = InputBox("Enter attachment file name:")
MsgBox("Filename=" & attach)
Set objShell = CreateObject("WScript.shell")
objShell.Run ("my command -attach" & attach)
Now suppose the variable "attach" has a space; lets say the value is "my document.txt". The proper way to run my commmnad line would be:
-attach "my document.txt"
How do I do this in VBS?
Thanks.