I have a .vbs file called Replace.vbs that:
1. opens a text file, test.txt
2. finds a string, orig_name
3. replaces string with new_name
The file runs and works fine if I go to Start-->run-->cmd
cscript replace.vbs ".\test.txt" "orig_name" "new_name"
However when I go try to run this using the shell command from Excel VB it does not work. I tried with the following code.
ChDir "C:\Documents and Settings\motaza\My Documents\ProEBats"
Shell cscript replace.vbs ".\test.txt" "orig_name" "new_name"
I tried a variation using & and commas but no luck.
Does someone the vb shell command syntax for passing arguments through a .vbs file?
Note Replace.vbs and test.txt are in the same directory.