Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

how to delete data files from cRIO

Solved!
Go to solution

Please forgive my ignorance, but I don't see how to delete old data files from a cRIO.  I've been trying to get a datalogger functional, and I've got some old data files on the cRIO.  I ftp off copies of the files through IE, but I don't know how to delete the files from the cRIO.

0 Kudos
Message 1 of 9
(7,814 Views)
Solution
Accepted by topic author fpdriscoll

If you FTP through Windows Explorer, My Computer, ftp://IP in the address bar, you should be able to delete files.

Message 2 of 9
(7,811 Views)

Is there a way to do this programmatically?

0 Kudos
Message 3 of 9
(6,738 Views)

Hey there trickador,

 

There is a host of functions available for FTP. You can find them by navigating to the Functions Palette of your block diagram and going to Data Communication>>Protocols>>FTP.

 

FTP1.PNG

FTP2.PNG

 

You will probably notice that... there isn't a specific delete function. This is where things get a little big tricky. With whats currently exposed in the palette there isn't access to a delete function but it is possible to access it from the source FTP library. Check it out,

 

Navigate to: C:\Program Files\National Instruments\LabVIEW 2012\vi.lib\FTP\NI_FTP.lvlib

 

There are 3 .llb's here. The FTP1.llb contains the lower level FTP components. One of which is FTP [DELE].vi. That should give you programmatic access to delete a file via FTP. However, you should be very careful when you are using this to make sure that you dont delete something on accident!

 

FTPDele.PNG

 

 

Hope this helps!

Tim A.
Message 4 of 9
(6,710 Views)

Hello when I try deleting files from my CRIO using IE i get error: 403 forbidden.  Even though i have logged onto the CRIO as 'admin' with a password.

Any Idea why this might be?

 

sorry i just realised i wasnt browsing through FTP 

I was just using the HTTP version which would not allow me to delete the files. 

 

 

0 Kudos
Message 5 of 9
(5,672 Views)

Fast forward to 2019, FTP is no longer supported.

 

To delete files I did this:

 

0 - In NI MAX, Enable Secure Shell Server and reboot cRIO

1 - Open Putty app

2 - Type in IP address of cRIO into Host, ie. 192.168.0.14.  Port = 22

3 - Press Open, which will launch a Linux shell session

4 - Login as: admin

5 - Password: <your_password>

6 - Type pwd to see where you currently are in the file structure, ie. /home/admin

7 - Traverse to your desired directory using cd command ie. cd /c/<yourdir>

8 - Type ls -al to list all files in selected dir

9 - Use rm cmd to delete files, ie. rm -i *.* (-i option will prompt you for every file)

 

Manual approach, but it worked.

 

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 6 of 9
(3,804 Views)

Hello

 

What if a Virtual Machine doesn't recognize ssh command to recursive delete files by this method?

 

Thanks

André Simões
Work with LV2019 and cRIO since 2021
0 Kudos
Message 7 of 9
(2,548 Views)

Are you communicating to the cRIO via a VM, or is the VM acting as the cRIO?

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 8 of 9
(2,529 Views)

Hello Ozfarmboy

 

I am communicating to the cRIO via a VM. I have approximately 10 cRIO installed under a technical network and i can't go to everyone that i want to delete files when the memory go away.

 

Thanks btw.

André Simões
Work with LV2019 and cRIO since 2021
0 Kudos
Message 9 of 9
(2,526 Views)