• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 129
  • Last Modified:

Copy a row from one text file to another text file

I want to write a function that copies one text file directly to the other text file in VB. The format for the source text file is like this:

"a",123,456,"b"
"c",234,567,"d"
...

There won't be a problem if I know what exactly are stored in the source file so that I can read the source file in to variables like this:

Input #1, var1, var2, var3...

So, like the above examples, the row can be like this : 123,456,"D",99999 or 444,555,666,111

I tried to read the whole row as a long string and then write the string back to the new file, however, the new file will not get the same result as quotation marks are added. So the result of:

"a",123,456,"b" will be written as """a"",123,456,""b""" in the new text file. So what should I do? (sorry for the long message above) Thanks a lot.
0
Naruto
Asked:
Naruto
1 Solution
 
vinnyd79Commented:
when you write the string back to the new file use "Print" instead of "Write" and you wont get the quotation marks.
0
 
NarutoAuthor Commented:
Hey, vinnyd79, thanks a lot! it works!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now