How to Delete the Files from FTP Server Programmatically

Updated Oct 25, 2020

Environment

Software

  • LabVIEW
  • LabVIEW Internet Toolkit

I communicate with FTP server using the FTP functions (Functions Palette>>Data Communication>>Protocols>>FTP) and these functions works correctly. I want to delete a file in the FTP server, but I can not find a corresponding function. How can I delete files on an FTP server programmatically?

There are no functions in the FTP subpalette to delete the a file from an FTP server. However, LabVIEW has many VIs corresponding to FTP commands that do not exist in the functions palette. The method using the VI corresponding to the DELE command to delete the file is as following step.
  1. Select Functions palette>>Select VI ... and browse to find ftp1.llb in the following path: C:\Program Files(x86)\National Instruments\<LabVIEW Version>\vi.lib\FTP\ftp1.llb.
    • If you are using LabVIEW 64-bit, use filepath C:\Program Files\National Instruments\<LabVIEW Version>\vi.lib\FTP\ftp1.llb.
  2. In the LLB Manager window, select FTP [DELE].vi and press OK button to place the selected VI on the diagram.
  3. Wire the necessary input and output terminals for this VI.

Additional Information

The palette of the FTP functions depends on the version of LabVIEW. In LabVIEW 5.1 and earlier, the FTP command functions were displayed on the functions palette by installing Internet Toolkit. In LabVIEW 6.0 to LabVIEW 2011, when you install the Internet Toolkit, it does not appear on the palette. And since LabVIEW 2012 and later, the Internet Toolkit has been discontinued and comes with all LabVIEW packages, but it will not be displayed on the Palette just as in LabVIEW 6.0 and later.

If you want to contain the FTP commands VIs in Functions palette, you need to extract LLB files and add the extracted VIs to Functions Palette manually.