I want to run HelloWorld.bat from the My Documents directory. I'm using OS-COMMAND VALUE("C:\Documents and Settings\My Documents\HelloWorld.bat") and it chokes on the blanks.
It works fine if I put my file directly on C: and use OS-COMMAND VALUE("C:\temp\HelloWorld.bat"), but I don't want to have to put my program in C:\temp.
Also, if I'm at the DOS prompt, I can cd to C:\Documents and Settings\My Documents, hit enter, then type HelloWorld.bat and it works fine.
Make your string value for the path a quoted one.
Try this:
OS-COMMAND VALUE(' "C:\Documents and Settings\My Documents\HelloWorld.bat" ').
or
define variable pathToBatFile as character no-undo initial "C:\Documents and Settings\My Documents\HelloWorld.bat".
OS-COMMAND VALUE(QUOTER(pathToBatFile)).
Hope it helps.
You're awesome! This works beautifully!!