Richard Ballantyne Posted June 9, 2005 Report Share Posted June 9, 2005 Is there a vi that I can use to simply delete a directory and all it contains? (i.e. the equivalent of executing rm -Rf <directory> in *nix) The only vi I found that can delete directories requires that the directory already be empty. This is bad because it means I have to list all the files in the directory and delete those first. If the directory contains more directories, then it just complicates things. It seems like it would be inefficient to have to write a recursive style vi that repeats this process of going through all the subdirs, deleting each subdirs files, and then deleting the subdir, until the top level directory becomes "empty". For the measurement system I'm building, I need to be able to delete directories containing millions files as quickly as possible. Any ideas? Richard Quote Link to comment
Jim Kring Posted June 9, 2005 Report Share Posted June 9, 2005 Is there a vi that I can use to simply delete a directory and all it contains? (i.e. the equivalent of executing rm -Rf <directory> in *nix)The only vi I found that can delete directories requires that the directory already be empty. This is bad because it means I have to list all the files in the directory and delete those first. If the directory contains more directories, then it just complicates things. It seems like it would be inefficient to have to write a recursive style vi that repeats this process of going through all the subdirs, deleting each subdirs files, and then deleting the subdir, until the top level directory becomes "empty". For the measurement system I'm building, I need to be able to delete directories containing millions files as quickly as possible. Any ideas? Richard 4964[/snapback] Download OpenG Commander from openg.org and install the file library package. This contains a VI called "Delete Recursive" that does just what its name implies. Quote Link to comment
Richard Ballantyne Posted June 10, 2005 Author Report Share Posted June 10, 2005 Jim, In laymans terms, that OpenG vi library kicks some serious @!$ (its great!!) Thanks for introducing me to it. Is there a version that works with the Linux version of LabVIEW? Thanks! Richard Quote Link to comment
Rolf Kalbermatter Posted June 11, 2005 Report Share Posted June 11, 2005 Jim,In laymans terms, that OpenG vi library kicks some serious @!$ (its great!!) Thanks for introducing me to it. Is there a version that works with the Linux version of LabVIEW? Thanks! Richard 4972[/snapback] What problems do you have with running this VI on LabVIEW for Linux?? IT should be all native if I'm not mistaken and therefore should work on any LabVIEW platform equally well. Rolf Kalbermatter Quote Link to comment
Jim Kring Posted June 11, 2005 Report Share Posted June 11, 2005 Jim, In laymans terms, that OpenG vi library kicks some serious @!$ (its great!!) Thanks for introducing me to it. Is there a version that works with the Linux version of LabVIEW? Thanks! Richard 4972[/snapback] Richard, You're very welcome and I hope you enjoy the various other libraries and tools that OpenG developers have created. I'm sure you will find a lot of @!$ kicking stuff in there Regarding Linux, Rolf is right, both OpenG Commander and nearly all of the downloadable libraries should work on Linux (and Mac, too). -Jim Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.