# PYDIO API Support to rename a file or folder

**URL:** <https://forum.pydio.com/t/pydio-api-support-to-rename-a-file-or-folder/1660>\
**Category:** Development\
**Tags:** api\
**Created:** [October 3, 2018, 1:10pm UTC](https://forum.pydio.com/t/pydio-api-support-to-rename-a-file-or-folder/1660 "2018-10-03T13:10:22Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![vclsystem](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@vclsystem](https://forum.pydio.com/u/vclsystem)\
**Post date:** [October 3, 2018, 1:10pm UTC](https://forum.pydio.com/t/pydio-api-support-to-rename-a-file-or-folder/1660/1 "2018-10-03T13:10:22Z")

</div>

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](https://pydio.com/api/myfiles/rename?file=file1.config&filename_new=file2.config)

its not working .

Please help me on this.

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [October 4, 2018, 7:26am UTC](https://forum.pydio.com/t/pydio-api-support-to-rename-a-file-or-folder/1660/2 "2018-10-04T07:26:36Z")

</div>

Hi,  
could you tell me if you are using pydio 8 or pydio cells ?

---

<div class="post-metadata">

**Author:** ![vclsystem](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@vclsystem](https://forum.pydio.com/u/vclsystem)\
**Post date:** [October 4, 2018, 8:54am UTC](https://forum.pydio.com/t/pydio-api-support-to-rename-a-file-or-folder/1660/3 "2018-10-04T08:54:42Z")

</div>

Hi

I am using pydio 6.x

Thanks

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [October 4, 2018, 11:46am UTC](https://forum.pydio.com/t/pydio-api-support-to-rename-a-file-or-folder/1660/4 "2018-10-04T11:46:51Z")

</div>

Hi,  
this php request allows you to modify the filenames,  
`php cmd.php -u=<user> -p=<password> -r=<workspacename> -a=rename --file='/filename' --filename_new='/newfilename'`

the cmd.php is located in your `<pydio>/cmd.php`,  
i will take a look to see how you can do a web request for that.

---

<div class="post-metadata">

**Author:** ![vclsystem](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@vclsystem](https://forum.pydio.com/u/vclsystem)\
**Post date:** [October 4, 2018, 12:20pm UTC](https://forum.pydio.com/t/pydio-api-support-to-rename-a-file-or-folder/1660/5 "2018-10-04T12:20:03Z")

</div>

Hi

already I have tried the same . but it snot working. i am using powershell.

Invoke-WebRequest “[https://zzzz.pydio.com/api/e01ead95195ba035d8af56378bc55de7/rename?file=/NewFolder/Web.config&filename\_new=/NewFolder/Web2.config](https://zzzz.pydio.com/api/e01ead95195ba035d8af56378bc55de7/rename?file=/NewFolder/Web.config&filename_new=/NewFolder/Web2.config)” -Method Post -Credential $credential

Thanks

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [October 4, 2018, 1:05pm UTC](https://forum.pydio.com/t/pydio-api-support-to-rename-a-file-or-folder/1660/6 "2018-10-04T13:05:56Z")

</div>

Hi,  
on what OS is your pydio running on?

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [October 4, 2018, 1:40pm UTC](https://forum.pydio.com/t/pydio-api-support-to-rename-a-file-or-folder/1660/7 "2018-10-04T13:40:01Z")

</div>

Here’s how i renamed the file with an http request,

`http://<pydio-uri>/api/<workspace id or alias>/rename/?file=/<targetedfile>&filename_new=<newname>`

---

<div class="post-metadata">

**Author:** ![vclsystem](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@vclsystem](https://forum.pydio.com/u/vclsystem)\
**Post date:** [October 5, 2018, 6:19am UTC](https://forum.pydio.com/t/pydio-api-support-to-rename-a-file-or-folder/1660/8 "2018-10-05T06:19:41Z")

</div>

or How to delete file ?

---

<div class="post-metadata">

**Author:** ![vclsystem](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@vclsystem](https://forum.pydio.com/u/vclsystem)\
**Post date:** [October 5, 2018, 6:22am UTC](https://forum.pydio.com/t/pydio-api-support-to-rename-a-file-or-folder/1660/9 "2018-10-05T06:22:59Z")

</div>

Invoke-WebRequest “[https://pydio-uri/api/workspace](https://pydio-uri/api/workspace) id or alias;/delete/?nodes[]=/bbb3.docx” -Method Delete -Credential $credential

I am getting

\<?xml version="1.0" encoding="UTF-8"?\>The selection is empty!

```
                : - catchException(AJXP_Exception)
                </message></tree>
```

---

<div class="post-metadata">

**Author:** ![vclsystem](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@vclsystem](https://forum.pydio.com/u/vclsystem)\
**Post date:** [October 5, 2018, 7:04am UTC](https://forum.pydio.com/t/pydio-api-support-to-rename-a-file-or-folder/1660/10 "2018-10-05T07:04:12Z")

</div>

Sorry . its wokring now. Rename and Delete .

Now Could you please guide me to move file … Thanks

---

<div class="post-metadata">

**Author:** ![vclsystem](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@vclsystem](https://forum.pydio.com/u/vclsystem)\
**Post date:** [October 5, 2018, 7:32am UTC](https://forum.pydio.com/t/pydio-api-support-to-rename-a-file-or-folder/1660/11 "2018-10-05T07:32:44Z")

</div>

Thanks . move is also working . thanks
