Error Transferring Files Over 2 GB Via FTP

Updated May 21, 2018

Reported In

Software

  • LabVIEW

Issue Details

I'm building an application that copies large files from multiple computers to a Network Attached Storage (NAS) using the FTP VIs. I'm having an error transferring files larger than 2 GB. If I transfer a files under the 2 GB, I can send them successfully. 

Solution

The FTP library was built in a older version of LabVIEW at a time when 2 GB was a reasonable size for a file due network limitations. If you need to transfer files larger than 2 GB, a possible workaround is changing the representation of the file size, This size is converter to a long integer (I32) that prevents the transfer of files larger than 2.147 GB. 

Workaround: 
1. Open the TCP Write Stream.vi that is located in:  C:\Program Files (x86)\National Instruments\LabVIEW 2017\vi.lib\FTP\util.

2. Open the Block Diagram and you will see in the first Case Structure the "To a Long Interger" function as shown below. 
 

3. Replace the "To a Long Integer" function with the "To Quad Integer" (I64) function located in the Numeric>>Conversion palette.  
 

 

WAS THIS ARTICLE HELPFUL?

Not Helpful