Jump to content

Recommended Posts

Posted

I've searched the forum and haven't found anything that I thought would help. And I'm not good at this...

I have two text files that I want to concatenate. And I want to write the concatenation result to a text file. Both files have pipe-delimited rows that look similar to this:  22|32566|john|doe|10|john.doe@email.org. The number of rows in each file changes every day.

This is the concatenation portion of my script (some of the includes are used in other parts of the script that aren't shown here):

#include <INet.au3>
#include <Array.au3>
#include <File.au3>
#include <Date.au3>
#include <CSV.au3>
#include <String.au3>
#include <SFTPEx.au3>

$path = @ScriptDir&"\"

$aTextFileA=_ParseCSV($path&"TextFileA.txt",'|')
$aTextFileB=_ParseCSV($path&"TextFileB.txt",'|')
_ArrayConcatenate ($aTextFileA, $aTextFileB)
_writecsv("TextFileC.txt", $aTextFileA, '|' )

I'd like TextFileC.txt to be written with rows that look similar to this: 22|32566|john|doe|10|john.doe@email.org. But what gets written is this: "22"|"32566"|"john"|"doe"|"10"|"john.doe@email.net"|""

Can you please show me how to write a TextFileC.txt file that doesn't contain quotation marks and a trailing pipe symbol? 

Thank you.

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...