In another recipe, we showed you how we can move the existing folders to trash. This recipe shows you how to do the same with files contained in the Pentaho solution's folders.
For this recipe, it is important that we use an administrator role's user to be able to move files contained in folders and files contained in public folders to trash. If the user we are using to access Pentaho is a normal user, he or she can move only files contained in his home directory folders to trash.
The following steps describe how we can easily move the content items files to trash:
Go to the solution explorer and browse the solution's folder structure for the folder that contains the file that we want to move to
Trash
.Select the folder by clicking on it, and then select the file to move to
Trash
.From the File Actions menu, select Move to Trash.
The Move to Trash warning dialog box appears by asking us if we are completely sure that we want to delete the file we selected.
If we press the Yes, Move to Trash button, the system deletes the selected file and takes us to the Browse Files perspective. If we press No, the Move to Trash operation gets terminated and we will be taken back to the Browse Files perspective without deleting any file.
The solution is immediately updated and the deleted file is no more present in the selected folder's file list.
The steps to move a file to Trash
are more or less the same as what we saw when we talked about moving a folder to Trash
.
Navigate the solution through folders until we locate the folder that contains the files we are going to move to Trash
. Select the content item file, and then click on Move to Trash from the Files Actions menu. A confirmation dialog box asks us to confirm the operation. By clicking on the OK button, the dialog box is closed and the content item is successfully moved to Trash
.
The Moving a folder to Trash recipe gives us an idea about how to do the same thing with folders. Moreover, take a look at the Restoring content items from Trash and Permanently deleting content from Trash recipes to see either how to restore content that is inadvertently deleted or how can we permanently delete space in the Trash
folder and make our system administrator happy!