Showing results for 
Search instead for 
Did you mean: 

Deleting set of files with the ftp-VI's


I need to now how I can delete a direktory including the files in it, with the ftp-VI's from the internet connectivity toolset.
I have used the FTP[dele].VI and the FTP[RMD]to delete single files and direktory.
I have been told that the UNIX command "rm -rf direktoryname" should delete the specified direktory and the contens of files.
I have tried to use this comman with the FTP, but it didn't work.
Can anybody help me ?
0 Kudos
Message 1 of 2

I may not be correct but directories that still contain files or subdirectories typically cannot be deleted using FTP software. You must first delete the files located in the directory you want to remove. As far as the Internet Toolkit goes, I dont really know but I know that clients like WS-FTP and the new FTP.NET component give you that option.

Looping through the folders and files seems to be the way to do it with labview. You could probably use this link as a starting point and modify it for FTP commands:

One thing to be aware of is that sometimes the directory will seem to be empty but it really isn't. It has at least one file under it somewhere that begins with a period (.) so that it is hidden or invisible to the regular 'ls' command.
In order to see and delete these hidden files,

1) Get a shell prompt and type:
ls -la /Dir1/Dir2/dirname

where /Dir1/Dir2/dirname is the full path to the directory that you are trying to delete. Doing that will show you all the hidden files inside the directory. You can then delete these hidden files using the standard commands.

Hope this helps
Cyril Bouton
Active LabVIEW Developper
0 Kudos
Message 2 of 2