Completed delete button for files and folders

Is there a way to do this without having to make a new object? If not, I feel like these variable names are a little ambiguous.