the path begins from within the data folder. So it should begin with the user-id of the user owning the file.
Example:
If you wants to delet a file example.txt in the Documents folder of user john, the call would be
occ files:delete john/files/Documents/example.txt
What I do not understand, is why you did not simply try it yourself. It is interactive and asks you if you (realy) wants to delete that file if the path was right or gives you a hint that the path could not be found:
root@box:~# occ files:delete john/files/Documents/example.txt
Delete /john/files/Documents/example.txt? [y/N] y
root@box:~# occ files:delete john/files/Documents/example.txt
file john/files/Documents/example.txt not found
You can enter the file-id instead of the path as well. Then it will ask you the same question with the path to that file. The file-id is a numeric token under which the file is registered in the filecache table of the database. You see the file-id in the url of the file if opened in your browser.
Example:
If the file-id of the file example.txt in the Documents folder of user john is 11290592, then you would see this:
Thank you so much for replying and explaining this, it is very appreciated!
That is because its our company server and I’m bit a afraid to mess things up. So I thought it was betters to ask to get it right from the start.
I was just about to ask that question on how to find the ID, but you explained that too which is great!
I did go to the data folder first manually and did try to delete the file, but it was not reflected in the Nextcloud UI which is why I figured/guess that you might need to delete the file (or folder for that sake), through OCC so it it deleted in the database too.
The reason behind this is because I have an issue with on file (its a manual backup copy of a wp-config.php file) , which Nextcloud refuses be to open, delete, move or copy with the error message:
No matter what I do it doesn’t make a difference and Nextcloud just refuse to do what I want (which in this case is delete the file)
You do not happen to have any idea of what is causing this and how to resolve this annoying issue?
No. I just deleted it into the trash folder in Plesk and reloaded the UI. occ files:scan --all
I didn’t know that command, thank you. I’m going to try that.
So that will refresh the database right?