Updating a folder name in a list using lists.asmx in SP 2007

Hi All,

I have a list with folders in it.

Now I need to change a folder name using lists.asmx.

This is my batch:

<Batch OnError="Continue">
  <Method ID="1" Cmd="Update">
    <Field Name="ID">12873</Field>
    <Field Name="FileRef">12873;#sites/[...some folders...]/FileIssuePHQ1</Field>
    <Field Name="Title">FileIssuePHQ1</Field>
    <Field Name="BaseName">FileIssuePHQ1</Field>
  </Method>
</Batch>

But the basename seems not to change.



Thanks in advance.

Regards

Tomasz


April 18th, 2013 5:37pm

Hi Poplawski IT Solutions,

I have a test in my local server with the List web serve to change the folder name, the xml is generated below, it works successfully to change the folder name:

"<Method ID='1' Cmd='Update'>"+

"<Field Name='ID'>86</Field>"+

"<Field Name='owshiddenversion'>1</Field>"+

"<Field Name='FileRef'>http://servername:100/Shared%20Documents/folder2</Field>"+

"<Field Name='FSObjType'>1</Field>"+

"<Field Name='Title'>NewFolderName</Field>"+

"<Field Name='BaseName'>NewFolderName</Field>"+

"</Method>"

Please try to change your code to check whether it works.

Thanks,
Qiao
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
tnmff@microsoft.com.

Free Windows Admin Tool Kit Click here and download it now
April 19th, 2013 10:09am

Hi Qiao,

thanks for your reply.

If I include the following point to my batch, I get an error. If I let it out the basename is still unchanged. My folder is not in a Document Library. It is in a list!

<Field Name='owshiddenversion'>1</Field>

Thanks,

Tomasz


April 19th, 2013 11:28am

Hi Poplawski IT Solutions,

Thanks for posting back.

Im not sure why this happens in your situation, would you please copy the xml string I provided in my post and change it to your specific file to check whether it works, it seems you also missed the <Field Name=FSObjType>1</Field>

Thanks,
Qiao
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
tnmff@microsoft.com.

Free Windows Admin Tool Kit Click here and download it now
April 23rd, 2013 4:27am

I think you missed a key point in Polawski's problem. He is attempting to update a folder BaseName in a list that is not a document library. I am experiencing the same problem.  If I update a BaseName in a Document Library folder, everything works as advertised for any folder ID I choose. When I attempt to do the same on another type of list, the BaseName will not change, unless the target is a folder whose ID=1.  If I try to change the BaseName of a folder with any ID other than 1 in a standard List, it fails (though I can still update the Title of the folder).

I appreciate any insight you can provide as to why this is and how we can fix it.

Geoff

June 5th, 2013 5:49pm

Hi GKOliver,

I was working on another project for a while.

Now I'm back to this project and see, that the issue still exists.

You are right, my folder is in a LIST!!!

Did you find any solution for this issue?

Thanks,

Tomasz

Free Windows Admin Tool Kit Click here and download it now
November 15th, 2013 7:29pm

Hi Geoff,

Have you found a solution for this issue?

I just realized, that it still exists in this project.

Thanks,

Tomasz

January 22nd, 2014 5:26am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics