I generating a huge consolidated text file using VB from numerous smaller text files.
Apart from consolidation, I want to save some time by directly generating this file without spaces and '"' symbols.

Any pointers on this would help.

Thanks in advance.


You have to be more specific. For example, you want to remove spaces. Do you mean leading, trailing or embedded spaces? You can remove leading and trailing spaces with Trim. You can remove embedded characters, space or otherwise, with Replace.

mystring.Trim()             'remove leading and trailing spaces
mystring.Replace(" ","")    'remove all spaces
mystring.Replace("""","")   'remove all double quotes