pydio / pydio-core

Pydio 8 official repository
https://pydio.com
GNU Affero General Public License v3.0
869 stars 289 forks source link

PYDIO FileSystem API for Rename a file or folder #1437

Open vclsystem opened 5 years ago

vclsystem commented 5 years ago

Hi ,

We are using PYDIO File System V1 . how to rename the file or folder . I tried with below

https://pydio.com/api/myfiles/rename?file=file1.config&filename_new=file2.config

its not working .

Please help me on this.

vclsystem commented 5 years ago

hi

Please update me

Thanks

jthabet commented 5 years ago

Hi, you can use the cmd.php that is located here <your-pydio>/cmd.php and use the following command php cmd.php -u=<user> -p=<password> -r=<workspacename> -a=rename --file='/filename' --filename_new='/newfilename'

for your case it would look like this, php cmd.php -u=<user> -p=<password> -r=myfiles -a=rename --file='/file1.config' --filename_new='/file2.config'

jthabet commented 5 years ago

hey, you can also use this http request http://<pydio-uri>/api/<workspace id or alias>/rename/?file=/<targetedfile>&filename_new=<newname>

or

curl --insecure -u <username>:<password> -X POST 'https://<your-pydio>/api/<workspace id or alias>/rename/?file=/<targeted file>&filename_new=<new-name>'