12-02-2009 04:11 PM
Within my company we store data in a hierarchy with 4 levels. In my program I've got buttons to delete any one of the levels. Today I accidentally deleted the third level when I meant to delete the 4th. Therefore, lots of other data on the 4th level that I wanted to keep is now lost. The File I/O palette's Delete doesn't go to the recycle bin, so I can not recover my lost files. I'd like to avoid this situation in the future, so does anyone know a way to delete to the recycle bin?
Solved! Go to Solution.
12-02-2009 04:34 PM
I know there are Windows API functions for doing this, but I am unaware of a feature in the default palette set to enable moving files to the Recycle Bin. If I recall correctly, the operation of "deleting to the recycle bin" copies the file(s) to a directory in the root of the drive and may rename the file as well...not too sure, you might try a google search for more info.
Also, I recall the OpenG tools had a palette for File I/O, you might check out some of the tools provided with their toolkit to see if they've already done this...
This is a great product suggestion and the feature could be implemented, though it probably would be dependent on the OS if the function calls change.
-Bob
12-02-2009 05:26 PM - edited 12-02-2009 05:28 PM
I have stripped out the interesting bit from another VI, try this. I agree that there should be native support for this.
A second option is to move the files to a directory inside your LV temp. directory. There is a path constant for the LV temp. directory, and I think the files are automatically removed at some point.
12-03-2009 08:30 AM
Darin.K wrote:I have stripped out the interesting bit from another VI, try this. I agree that there should be native support for this.
That's great Darin, thanks. It didn't work for directories, but it was simple enough to choose a different method for the invoke node.
11-27-2017 05:03 PM
that is good idea. thanks.