LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Empty lines getting inserted while copying File data as chunks

When I try to copy data from one file to other, Extra lines are getting inserted into the copied data.

 

I am actually reading chunks of data from the first file and writing it to the other by using 'Byte' count to read.

Whenever the no. of bytes read ends with the EOL, one extra line is getting inserted in the second file. 

 

Consider the code snippet given below :

Untitled.png

 

 

If the first file content is like this :

File to be copied

 

Then the copied file looks :

 

 

Copied File

 

The two files are also attached with this post.

 

Please shre your suggestions to solve this issue

Download All
0 Kudos
Message 1 of 2
(2,268 Views)

Right click on your Read and Write text file functions and uncheck the Convert EOL option.

 

You should also set the browse options for the 2nd file path to allow for new or existing files, and the file open to be for Open or Create.  Without those changes, you can't pick a new file and if you could, you'd get error when it tried to open the file that didn't exist.

Message 2 of 2
(2,256 Views)