You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will copy the file into the /recyclebin folder and then delete it from the /srv folder or if a folder will be deleted all files in the folder will be copied to the /recyclebin and then the complete folder will be deleted from /srv
Also a nice thing is here that the files will be copied with the parent folder path to the /recyclebin folder so when the same filename from a different folder will be deleted it will not overwrite it in the /recyclebin
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
To create a recycle bin function in Filebrowser i have created a new folder
/recyclebin
and added a command by "Before Delete" with following code:/bin/bash -c 'if [ -d "$FILE" ]; then mkdir -p "/recyclebin$FILE" && cp -R "$FILE" "/recyclebin$(dirname "$FILE")"; elif [ -f "$FILE" ]; then mkdir -p "$(dirname "/recyclebin$FILE")" && cp "$FILE" "$(dirname "/recyclebin$FILE")"; else echo "is not valid"; fi'
This will copy the file into the
/recyclebin
folder and then delete it from the/srv
folder or if a folder will be deleted all files in the folder will be copied to the/recyclebin
and then the complete folder will be deleted from /srvAlso a nice thing is here that the files will be copied with the parent folder path to the
/recyclebin
folder so when the same filename from a different folder will be deleted it will not overwrite it in the/recyclebin
Beta Was this translation helpful? Give feedback.
All reactions