Delete Folder Programmatically on NI Linux Real-Time Target Using WebDAV

Updated Dec 9, 2022

Environment

Software

  • LabVIEW

This tutorial will show you how to delete folder or file programmatically on your NI Linux Real-Time target using Web Distributed Authoring and Versioning (WebDAV) in LabVIEW.

  1. Install NI Software on your NI Real-Time target, make sure to add WebDAV Client with SSL Support and WebDAV Server.

cRIO - Copy.PNG 

  1. Verify whether the folder or file that need to be delete exist on NI Linux-Real time target. You can follow the steps to Configure permanent WebDAV mappings for your OS in this link to verify the location of your folder or file. For example, in this tutorial it will show you how to delete the Test folder on NI Linux-Real time target. 
file path.PNG
  1. After verify that the Test folder exist, copy the folder path as highlighted on the above picture to be use in LabVIEW program.
  2. In LabVIEW program, use Delete VI function and specify the folder location home\lvuser\natinst\bin\Test as shown in the picture below to delate the folder. For Open Session VI, use http://hostIPAddress/files/ for host uri prefix, then specify the username and password of your NI Linux-Real time target.

code.png

  1. Run the program, then the Test folder should be delated from your NI Linux-Real time target.
 

empty folder.PNG