Ascii Mode appending extra records to csv file

I am relatively new to this forum and Unix scripting.

ksh script:
part 1 :will call a PL\SQL program will create 3 CSV file at the unix directory.
part 2 : will sftp the files to the EFT server.

Once the EFT server receives these file , it will transfer them to a shared windows folders.

EFT team uses tumbleweed tools to configure there settings,
Initially with auto transfer mode, each records in the csv file at the windows shared folder has a weird character "[]" at the end of each line to avoid this we changed the tranfer mode setting to "ascii" . The process runs just fine for small files ( say below 2200 records) for a csv with 2700 records , the EFT received the file right ( size was correct say 10mb) but the file when leaving EFT(with ascii setting on ) increases its size (to say 15 mb) and the final CSV when looked at windows shared folders has 3500+ records (instead of 2700+) records.

when the transfer mode is set back to "auto" , its transfers the file right but with a"[]" at the end of each line.

Look at some of the lines on the unix box before using sftp to transfer it to the EFT host, then look at the same lines on the EFT host.

Is the file ok after it arrives on the EFT host, If so, the EFT host is most likely a unix or linux box.
Look into the unix command: unix2dos

sftp doesn't have the separate ASCII and binary transfer modes of standard FTP, only binary. All files are transferred literally. Therefore, if you copy ASCII text files between Windows and Unix with sftp, end-of-line characters aren't translated properly.

If the file is ok on the EFT box, maybe they can zip up the file or run the unix2dos command before transferring it to the windows host.

some time back i had the similar issue. my csv file was generated from cognos on unix box but it was having some special characters. I just did find and replace from ksh script before processing it.

This might be relating to the file format. You can explore doing a unix2dos command on your files before sending to the windows destination.