s-KaiNet / spsave

Save files in SharePoint using node.js easily
MIT License
86 stars 22 forks source link

Is it possible to rename the folder in sharepoint ? #57

Closed anfasci closed 5 years ago

anfasci commented 5 years ago

I want to rename one folder which has child folder and files. Is it possible? My aim is to backup the old file before upload the same folders.

koltyakov commented 5 years ago

Yes, it's possible to rename a folder.

anfasci commented 5 years ago

how?

koltyakov commented 5 years ago

Using SharePoint API, obviously. ;) But this is not the use case of spsave.

koltyakov commented 5 years ago

Well, ok, trolling aside. To rename a folder you should update FileLeafRef property of the folder item. See PnPjs way. Within gulp task, you can send the corresponding request with PnPjs or a raw one with sp-request library

anfasci commented 5 years ago

Thanks

s-KaiNet commented 5 years ago

Hi @anfasci This question is not specific to the library, in future I will close similar issues. Please respect someone else's time. Please use special forums like https://sharepoint.stackexchange.com for your specific questions.
Andrew thank you for your support.