Re: File Editting

Tech-Archive recommends: Fix windows errors by optimizing your registry



Unfortunately, I don't know how to get to each line. I'm an old Foxpro
programmer and am just starting to use the scripting languages. I
should be able to investigate the replace function with no problem.
What about looping through my text file for each line?

Thanks,
Ted

TDM wrote:
"Ted Watkins" <wdet@xxxxxxxxxxxxxxxxx> wrote in message
news:cd08ce970cad4976b03f2fc5a07c40cd@xxxxxxxxxxxxxx
I am just learning to use vbscript and need some help. I have a file that
is 12,000 lines in length with approximately 256 characters per line. I
was
going to import the file to my data table but contained in the file are
some
comma's scattered throughout the records. These pesky little critters are
keeping me from using the DELIMITED function of my IMPORT routine. Can
someone point me in the direction for writing a vbscript routine for
searching each line and replacing each comma with a blank space.

Thanks,

Ted

It sounds like you know how to get to each line, you can then use the
Replace
function to replace the commas with spaces.

Replace(expression, find, replacewith[, start[, count[, compare]]])TDM

.



Relevant Pages

  • Re: Record Set List separated by Commas
    ... I am not a programmer but always trying to learn things to ... > get it to work for what I want, but I can't seem to separate the values by ... >> Doug wrote: ... but it puts a comma after the last entry too. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Record Set List separated by Commas
    ... I am not a programmer but always trying to learn things to ... > Doug wrote: ... but it puts a comma after the last entry too. ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.db)
  • Re: Iteration in lisp
    ... that had error messages that say something like "Error: missing comma ... the wayward programmer will never learn his lesson???] ... People have had little success writing software that works, it may be too soon for people to be writing software that figures out what software other people meant to write. ...
    (comp.lang.lisp)
  • Re: File Editting
    ... is 12,000 lines in length with approximately 256 characters per line. ... keeping me from using the DELIMITED function of my IMPORT routine. ... someone point me in the direction for writing a vbscript routine for ... searching each line and replacing each comma with a blank space. ...
    (microsoft.public.scripting.vbscript)
  • Record Set List separated by Commas
    ... am not a programmer by trade. ... Here is what I am using, but it puts a comma ...
    (microsoft.public.inetserver.asp.db)