Windows Script Host enables you to run scripts from the command prompt. CScript.exe provides command-line switches for setting script properties.Host Options (preceded by two slashes) enable or disable various Windows Script Host features. Script options (preceded by a single slash) and parameters are passed to the script.
I need to run a command to copy a file from one location to another through Command Prompt using a vbs file. this is what I have however it keeps throwing an error at me.
The error i get is:
Source: Microsoft VBScript compilation error'
Please help :)
2 Answers
The problem is on this line:
Your first quote next to 'S:Claims' ends the string; you need to escape the quotes around your files with a second quote, like this:
You also have a typo in S:ClaimsSound.wav
, should be S:ClaimsSound.wav
.
I also assume the apostrophe before Dim oShell
and after Set oShell = Nothing
are typos as well.