FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete a file on remote FTP server

Hello
 
I want to delete files of remote FTP server from a client.  I  developed  a code that is attached  but  its  not  working. I am sending the path as e.g. /data1/file1
Please help me to sort out the problem.

Best Regards
Mani
Message 1 of 8
(9,619 Views)
Hi Mani,

"Error 66 occurs if the TCP/IP connection is closed by the peer. In this case, Windows notices that no data is returned within a reasonable time, and it closes the TCP/IP connection. When LabVIEW attempts to communicate after Windows closes the connection, error 66 is the result."

I recommend that you start with one of the FTP examples provided with LabVIEW.  Help >>  Find Examples... >> Browse by Task >> Toolkits and Modules >> Internet >> FTP Browser.vi.  If the example works for you, it may be easier to use the example as a base for the function you'd like to implement.  I hope this points you in the right direction.

Delete File from FTP Server using Internet Toolkit


0 Kudos
Message 2 of 8
(9,598 Views)
Hi

Thanx Steve; I have already tried that example it was really helpful for me to implement my other requirements but I am still stuck with the delete function. Is there any other way to remove the error.


Regards
Imran
0 Kudos
Message 3 of 8
(9,588 Views)
Imran,

The FTP [DELE] VI is not valid on directories, only files.  I was unable to tell if you were trying to remove a file or directory.  Would you please tell me which you are trying to delete?  Thanks.
0 Kudos
Message 4 of 8
(9,571 Views)


@Pie56694 wrote:
Imran,

The FTP [DELE] VI is not valid on directories, only files.  I was unable to tell if you were trying to remove a file or directory.  Would you please tell me which you are trying to delete?  Thanks.


Imran,

I'm sorry, your post does say, file1, so I think you are using it on a file so it should be OK.  What type of FTP server are you working with?  Are there permissions required to delete files?  If you have a Windows PC, can you direct a Windows Explorer window to the FTP server and delete the file through Windows Explorer?  Did you confirm that the file is not actually deleted from the FTP server after you ran the command?
0 Kudos
Message 5 of 8
(9,566 Views)
Hi Steve

Thanx for your replies. My target FTP server will be cRIO 9014; but at the moment for testing I am targeting a desktop with FTP server installed. Through the window browser the files can be deleted but not through FTP DELE function of LV. So we can't say that delete file prevelidge is not available for remote computers.
I am also having problems to log data on  NI 9802 SD Card Memory Module through cRIO caz I haven't used the FPGA module yet; I'll be sharing this problem on the corresponding thread but if you could help then plz.. share

Regards
Mani

0 Kudos
Message 6 of 8
(9,540 Views)
Hi Mani,

Below is code that ran successfully on a cRIO-9002.  It looks much the same as yours, please double-check the formatting of your string controls.  If things still do not work, let's look at the cRIO more closely.










Message Edited by Pie56694 on 06-30-2008 09:45 AM
Download All
0 Kudos
Message 7 of 8
(9,524 Views)
Hi Steve

Thanx for your help. I have sent the code for testing.


Regards
Mani
0 Kudos
Message 8 of 8
(9,496 Views)