I am new to Sharepoint. I have a list of files in a document library. Files are placed within the year folder, followed by the sub-folder of month and the day wise sub-folders. I have a list of existing file names (loaded in SP 2013) and new file name in an excel file.

Is there any way to have the file names changed from old to new using REST and JS? Note that the old file names are not the exact match with the files loaded in SP lib.

Eg: old name is a123_yasdfi_123bc in excel and we have to search using "like" operator

  • Possible duplicate: sharepoint.stackexchange.com/questions/83382/change-file-name – Submits Jan 18 '16 at 10:34
  • Thanks for response. I cant view the complete code in this site shillier.com/archive/2013/03/26/… Can you please let me know the complete actual code ? – Vignesh K Jan 19 '16 at 11:23
  • The link is now dead. See the accepted answer in my link. It has links to references for the CopyTo and MoveTo REST functions. You have to use one of these functions to "change" a file's name via REST. – Submits Jan 19 '16 at 14:02
  • will that code work even for SP2013? the reason is that we dont have a test evironment.. i have to attempt in production – Vignesh K Jan 20 '16 at 6:47
  • Should work in SP2013. – Submits Jan 20 '16 at 9:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.