g707
04-23-2004, 10:16 AM
Here what I'd like to do in VB Script:
1) Read a file = C:\file.log
2) Replace/reformat every instance a partial string.
*Example:
Replace
"04/01/2004 12:00:00.001"
with
"04/01/2004","12:00:00.001"
I could just replace all instances will of:
'/2004 ' with '/2004","' - (single quotes are shown to display blank)
Using the Replace(), but I am having some problems reading the file when using replace().
Probably just syntax can anyone help?
Also, The strings appear in the same spot on every line, could I also use the mid function? Which method would be better?
This seems simple enough, but I can't get the syntax right.
Any help would be greatly appreciated.
Thanks,
*******
* g707 *
*******
1) Read a file = C:\file.log
2) Replace/reformat every instance a partial string.
*Example:
Replace
"04/01/2004 12:00:00.001"
with
"04/01/2004","12:00:00.001"
I could just replace all instances will of:
'/2004 ' with '/2004","' - (single quotes are shown to display blank)
Using the Replace(), but I am having some problems reading the file when using replace().
Probably just syntax can anyone help?
Also, The strings appear in the same spot on every line, could I also use the mid function? Which method would be better?
This seems simple enough, but I can't get the syntax right.
Any help would be greatly appreciated.
Thanks,
*******
* g707 *
*******