I need to automatically rename all my files according to a specific pattern. Currently it’s a mess, so I would like to write some kind of script that does the job for me.
I used webdav in the past to simply upload files from a website where i want them to be, and that worked very well. However, I am afraid I will need to use the owncloud API now but I can’t really find an example to begin with. Do I really need to write a specific app for what will probably amount to few lines of code, looping through all my files and changing their name/path ?
I assume I cannot simply move them on the filesystem as it would mess up the database. Any help/pointers towards the most proper best practice / documentation page would be appreciated.
Downsides of option 1 is the amount of network traffic (isn’t always a downside) and you need the data on the server as well as on a client. Option 2 has the downside that the shares on the old files will be lost.
Ah, so if i renamed directly on the server i would simply lose the metadata about the shares and versions? so i assume all content under username/ will still automatically be detected?
If so I think I can live with that, thank you! I will do some testing but seems like the smartest move!
There is no automatic detection for fiddling about in the filesystem backend, that’s why you have to run the occ command.
This is always the best idea I would recommend to set up a quick docker environment on your local workstation, or a clone of your production VM and confirm which behavior is acceptable.