Receiving error while updating a folder inside sharepoint list

What my code does - runs through each folders present in a list, and if any of the folders are in the name with current year, then it shall be renamed, ie 2012 to 2012_Backup. Soon after it is renamed we will create a name folder named 2012 and I get error
here. Below is my code. Please suggest a work arround please.
for (int i = 0; i < additionalList.Folders.Count; i++)
                    if (additionalList.Folders[i].Folder.Name == Convert.ToString(DateTime.Now.Year))
                        oldFolder = targetList_additionalList.Folders[i];
                        oldFolder[Title] = Convert.ToString(DateTime.Now.Year) + backUp;
                        oldFolder.Update();
                        additionalList.Update();
SPListItem newfolder = targetList_additionalList.AddItem(workflowProperties.Item.Folder.ServerRelativeUrl, SPFileSystemObjectType.File);
                          newfolder[Title] = Convert.ToString(DateTime.Now.Year);
                   newfolder.Update();
                   targetList_additionalList.Update();
Error Details :
Microsoft.SharePoint.SPException: Invalid file name.
The file name you specified could not be used.  It may be the name of an existing file or directory, or you may not have permission to access the file.
Shameej

Hi shameej,
Based on the error message, the issue should be caused that the new folder is created before the old folder name change.
From your code sample, you seems to execute the code in workflow, if so, before the new folder item is created, add wait for sometime action, whether this can fix the issue?
if it isn't the issue, would you please help to provide more information about your code execution environment, in which type of project?
Thanks,
Qiao Wei
TechNet Community Support

Similar Messages

  • Error while deploying VS Workflow to SharePoint List

    Hi all,
    I am getting error while deploying the WF to SharePoint 2013 list
    Error 1 Error occurred in deployment step 'Activate Features': Microsoft.Workflow.Client.ActivityNotFoundException: The activity named 'WorkflowXaml_782198e9_fd42_4862_bdc0_d4a966f97c29' from scope '/SharePoint/default/36804029-858c-48cc-af57-4264730767a6/0068758c-be16-420e-a97e-46ab58b67daf'
    was not found. HTTP headers received from the server - ActivityId: 0599b125-8148-4dd5-87bb-c90356bd00c6. NodeId: ServerName. Scope: /SharePoint/default/36804029-858c-48cc-af57-4264730767a6/0068758c-be16-420e-a97e-46ab58b67daf. Client ActivityId : e265df0a-03ea-40dc-98
      0 0 ReportReqWF
    I tried Powershell as
    Register-SPWorkflowService -SpSite 'http://servername/site/' -WorkflowHostUri 'http://servername:12291' -AllowOAuthHttp -Force -ScopeName 'SharePoint'       Command executes but error remains same.
    Please help me

    Hi Sunita,
    Firstly, I recommend to debug your workflow in Visual Studio to see if there is anything incorrect in the code about Activating the feature.
    Then I recommend to deploy the project as wsp solutions and then deploy it to SharePoint. After that use Install-SPFeature command to install the feature, then activate the feature to how it works.
    Here are some similar threads for you to take a look:
    http://social.technet.microsoft.com/Forums/en-US/251a7977-13ba-4568-932d-eed55d5c2bfc/missing-workflow-xaml-feature-error-during-site-creation-from-custom-template?forum=sharepointadmin
    http://social.technet.microsoft.com/Forums/en-US/0c470b4b-8e32-47ab-bc29-409db01dce81/unable-to-activate-the-workflow-feature-in-sharepoint-2013?forum=sharepointcustomization
    More information:
    Develop SharePoint 2013 workflows using Visual Studio
    http://msdn.microsoft.com/en-us/library/jj163199%28v=office.15%29
    Walkthrough: Creating and Debugging a SharePoint Workflow Solution
    http://msdn.microsoft.com/en-us/library/ee231573(v=vs.110).aspx
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Picture of usb plugging into itunes, received error while updating software for ipod touch

    tried updating software on new (refurb) ipod touch. everything was going ok with updates, when it was almost complete i received an error. now i have a picture of itunes with a usb cord plugging into it and it won't do anything else.  accessed itunes through firefox. any suggestions?

    Try here.  iPhone and iPod touch: Unable to update or restore

  • Error while creating new item in SharePoint List

    Hi,
    I have requirement to use cascading dropdown, I just created all the steps which are explained in the below URL
    http://spcascade.org/. But i am getting Debug message Error: "Error pulling data from list"
    and "try setting spWebUrl to appropriate SharePoint URL". Please help me to find the solution fro this.
    Thanks.

    var spObj = $().SPCascade({
    destListColTitles: ['Continent','Country','State','City'],
    srcListColInternalNames: ['Continent','Country','State','Title'],
    srcListName: 'CitiesLookupList',
    srcListFilterCAMLQuery: "<Query><Where><Contains>
    <FieldRef Name='Continent'/><Value Type='Text'>America</Value>
    </Contains></Where></Query>"
    spWebURL: 'http://sharepointurl',
    getDataOnly: 'false',
    debug: 'true',
    });

  • Cross Domain Trust Error, while opening the infopath in sharepoint list.

    Dear All,
    Facing some issue in
    Environement:
    Windows = Windows Server 2008
    Shareppoint = Sharepoint Server 2013.
    Project Server = Project Server 2013
    Info Path = Info Path Designer 2013
    Detailed:
    I have sharepoint environment with Project Server,I which have created task list in my project site and then i customize that form using info path their is one column named: "Product Name" in my task list which is drop down menu in that menu
    i want to show all the project name which are created in PWA Site. For that i made the External data connection to my sql server and select my desired table from that and also configured the my column data "i:e; Product Name. And published it to the my
    site. Now when i opened that form it prompts the error
    "The form cannot be submitted because this action would violate cross-domain restrictions. 
    If this form template is published to a SharePoint document library, cross-domain access for user form templates must be enabled
    under InfoPath Forms Services in SharePoint Central Administration, and the data connection settings must be stored in a UDC file in a data connection library in the same site collection. 
    If this is an administrator-approved form template, the security level of the form must be set to full trust, or the data connection
    settings must be stored in a UDC file by using the Manage data connection files option under InfoPath Forms Services in SharePoint Central Administration ."
    Oopsss !!
    Now start googling it found couple of solution shared listed below:
    1. Enable the cross domain authenticated in Central Admin –> General Application Settings –> Configure InfoPath Form Services (Done)
    2. Now Created the data connection library in my site collection which is PWA Site after that i went to the infopath and creating the data connection and
    Convert to Connection File and enter the URL of the data connection library
    and its prompt the error " the specified url is not a data connection library and enter the correct filename" didnt remember the exact error description at the moment.
    So, that was all stuff, Kindly suggest me any step which i missed that or ay solution that resolve my this issue.
    Thanks
    REGARDS DANISH DANIE

    it seems the data-seed failed in your dehydration store.
    so i would check if user orabple exsits in your db (pw is orabpel) .. and recreate the schema by executing the following script (based on your db)
    orabpel\system\database\scripts\domain_oracle.ddl
    hth clemens

  • Firefox crashes whenever i want to install any addon or download any file. Some times i am receiving error while downloading any file like "could not be saved, because you cannot change the contents of that folder"

    I am the user of latest firefox 3.6.6 browser. I am getting problems of frequent crashes whenever i tries to install any addon. The crashes also occures whenever i want to download any file.
    I am also receiving errors while downloading any file like:
    "C:\Users\****\AppData\Local\Temp\******.001.part could not be saved, because you cannot change the contents of that folder.
    Change the folder properties and try again, or try saving in a different location. I already changed it many many times but still the same problem."
    Adobe flash palyer is also giving problems of not responding. I am using updated version of it already. Java is also updated.
    I already uninstalled firefox compeletly and re installed it many many times but still the same problem. I also scanned my computer with avira and malware bytes' Anti malware and got no dection. Please ractify this problem ASAP lest my profession will suffer.
    == Crash ID(s) ==
    b7f518f2-8d86-41ca-8bab-aee632100709; 1d790e10-d8eb-4904-98c9-94bc62100708; f042d319-b9f8-42ed-a8cb-57c7d2100708

    Please help.
    It is getting worse
    Adobe flash player is crashing. I already uninstalled and re installed the latest ver. Also it is hanging randomly.
    Please help.

  • TS3694 I received an error while updating my phone to ios6. Now it's frozen and I can't power down or reconnect it to show in iTunes. What do I do?

    I received an error while updating my phone to ios6. Now it's frozen and I can't power down or reconnect it to show in iTunes. What do I do?

    You can try contact iTunes support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Error while updating account dim

    I get the below error while updating the Outline Account Dim.This error occurs only when updating account dim. It does not happen with other dimensions. So it doesn't seem to be the connection being down. If we recycle the analytics server. But we are not able to find out the actual cause for this issue.
    Error message:
    Cannot build dimension. Analytic Server Error(1042017): Network error: The client or server timed out waiting to receive data using TCP/IP. Check network connections. Increase the NetRetryCount and/or NetDelay values in the ESSBASE.CFG file. Update this file on both client and server. Restart the client and try again
    Additional information
    Account is defined as dense dimesion with 1800 level 0 members. We are updating this using rules file.
    Potential Number of Data Blocks     :     27762609853440
    Number of Existing Data Blocks     :     2625360
    Index Cache: 40960
    Data cache : 20480
    I appreciate any help in resolving this issue

    There is probably something in your dim build source file that Essbase doesn't like and isn't giving you a good error message. Did this dim build work in the past and you recently added something to it?
    Try excluding certain columns like member properties and data storage just to see if you can get the members to load. Then slowly bring back in the other columns to see if you find the one that has the problem. Similarly try keeping all the columns but just try loading one record and see if it succeeds, this will help you start to narrow down if it is a load rule or source issue. Other option is to create a new load rule, perhaps there is something wrong with the one you are using.
    Unfortunately there is no magic bullet here, you just have to work through small samples to try and isolate what the problem is.

  • Error while updating the plan in Enterprise link

    hi
    i am getting an error while updating the plan which polls the JMS topic and inserts into the grid.
    IMessageSourceReceiver->messageReceive: javax.jms.JMSSecurityException: JMS-232: An invalid user/password was specified for the JMS connection
         at oracle.jms.AQjmsDBConnMgr.checkForSecurityException(AQjmsDBConnMgr.java:916)
         at oracle.jms.AQjmsDBConnMgr.getConnection(AQjmsDBConnMgr.java:601)
         at oracle.jms.AQjmsDBConnMgr.<init>(AQjmsDBConnMgr.java:238)
         at oracle.jms.AQjmsConnection.<init>(AQjmsConnection.java:183)
         at oracle.jms.AQjmsTopicConnectionFactory.createTopicConnection(AQjmsTopicConnectionFactory.java:209)
         at iteration.enterpriselink.sources.JMSConsumer.start(JMSConsumer.java:94)
         at iteration.enterpriselink.sources.JMSMessageSourceReceiverImpl.jmsConsumerStart(JMSMessageSourceReceiverImpl.java:1001)
         at iteration.enterpriselink.sources.JMSMessageSourceReceiverImpl.messageReceive(JMSMessageSourceReceiverImpl.java:326)
    [Oracle BAM Enterprise Link error code:  0x75 -- 0x1, 0x75 -- 0x3A]
    Error during Message Receive operation.
    [Oracle BAM Enterprise Link error code:  0x75 -- 0x1, 0x75 -- 0x3B]
    Error while processing the data for the step 'Oracle BAM Enterprise Message Receiver'
    [Oracle BAM Enterprise Link error code:  DC -- 0x1, DC -- 0x83]
    Error while processing the data for the step 'Oracle BAM Enterprise Message Receiver'
    [Oracle BAM Enterprise Link error code:  DC -- 0x1, DC -- 0x83]
    Update of Plan "Untitled, created 3/11/2009 3:56:28 PM" failed.
    [Oracle BAM Enterprise Link error code:  PlanMgr -- 0x1, PlanMgr -- 0xD5]
    the username and password that i have given are valid and i have given privileges that were mentioned on the technote to the user. can somebody help me out in resolving this as this is very critical for me right now
    Thanks in advance

    I also get error while updating the content in workflow thru the checkout option as reviewer. i.e. contributor checks in the content - then reviewer either updates the metadata or checks out and modifies the content and while checking in the following error occurs
    Content Server Request Failed
    Unable to update the content item information for 'HO000128'.
    The content ID must be specified.
    Please help to resolve.
    Thanks in advance
    Prasad

  • AD Administration error: aijmgrStoreNodeName:Error while updating FND_INSTA

    Hi
    While applying a patch i am receiving the following:
    Starting worker processes.
    AutoPatch error:
    aijmgrStoreNodeName:Error while updating FND_INSTALL_PROCESSES
    AutoPatch error:
    ORA-01403: no data found
    AutoPatch error:
    Error: Calling aijmgrStoreNodeName():aijms1
    Error running SQL and EXEC commands in parallel
    I am on 11.5.10.2 wtih DB at 10.2.0.4.
    Thanks.

    AutoPatch error:
    aijmgrStoreNodeName:Error while updating FND_INSTALL_PROCESSESDrop this table and apply the patch from the beginning.
    AutoPatch error:
    ORA-01403: no data found
    AutoPatch error:
    Error: Calling aijmgrStoreNodeName():aijms1Can you reproduce the issue if you apply any of the patches individually?
    Thanks,
    Hussein

  • Downloaded new version itunes to Windows 7, now receiving error while computer is booting Apple Sync Notifier.exe- Entry Point Not Found the procedure entry point sqlite3_wal_checkpoint could not be located in the dynamic link library SQLite.dll., Help!

    Downloaded new version itunes to Windows 7, now receiving error while computer is booting Apple Sync Notifier.exe- Entry Point Not Found the procedure entry point sqlite3_wal_checkpoint could not be located in the dynamic link library SQLite.dll., Help! How do I remove this message every time I start up Windows? Would it help to
    re-install Itunes and what version??

    Refer to this thread - https://discussions.apple.com/message/15685210#15685210
    Quick answer "copy the file SQLite3.dll from the C:\Program Files (x86)\Common Files\Apple\Apple Application Support folder to the C:\Program Files (x86)\Common Files\Apple\Mobile Device Support folder"

  • I just upgraded to Yosemite. Iphoto is now broken.  Upon upgrade receiving error "This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or cancelled."

    I just upgraded to Yosemite. Iphoto is now broken.  Upon upgrade receiving error "This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or cancelled."

    Perform the following, stopping with the first one which works:
    1. Open the Mac App Store's Purchases tab. If you're prompted to accept iPhoto into your Apple ID, do so.
    2. Move it out of the Applications folder(it may need to be put into the Trash temporarily), and then see if you can download it for free from its individual product page.
    3. Click here and contact Apple.
    (116137)

  • Error while updating a plan

    Hi,
    I have encountered an error while updating a plan. While i update the uplan , the grid gets filled but it throws a message stating
    "Maximum Number of Result Blocks has been reached"
    Maximum number of Result Blocks has been reached.
    [Oracle BAM Enterprise Link error code:  DC -- 0x1, DC -- 0xD4]
    Error while processing the data for the step 'Grid'
    [Oracle BAM Enterprise Link error code:  DC -- 0x1, DC -- 0x83]
    Maximum number of Result Blocks has been reached.
    [Oracle BAM Enterprise Link error code:  DC -- 0x1, DC -- 0xD4]
    Error while processing the data for the step 'Grid'
    [Oracle BAM Enterprise Link error code:  DC -- 0x1, DC -- 0x83]
    Update of Plan "deposittest created 7/19/2007 5:11:50 PM" failed.
    [Oracle BAM Enterprise Link error code:  PlanMgr -- 0x1, PlanMgr -- 0xD5]
    The data updation stops after the row count 49900.
    Please help to resolve this error .
    Thanks in advance.
    Regards,
    Lathika

    Hi,
    in BAM-Administrator you should rraise Parameter "MaxResultBlocks".
    BAM originaly is al licensed Software from Group1 named "Sagent Data Flow".
    This may help searching the web.
    Greetz,
    GOI

  • Error while updating to iOS 6.1.2

    Error while updating software to iOS 6.1.2

    what is the error? if you want help you need to provide some details.

  • Error While updating info in the People Form-Additional Personla Details

    Hi All,
    Iam getting an Error While updating information in the People Form,Additional Personla Details DFF.
    Error Like:
    APP-PER-289974:There has been an error Processing this person,The error encountered is 'ORA-20001:HZ_STNC_SQL_EXCEP:N,PROC.sync_Person,N,ERROR.ORA-25153:Temporary Tablespace is empty ,N,POO,1265890',which occured in procedure  per_htrca_merge_tca_person at step10.
    Please contact your support represntative.
    Thanks -
    Sowmya

    Thanks you,
    By this Note id:395136.1
    Iam unable to find this Set profile 'HZ: Generate Events for DQM Real-Time Synchronization' to No
    with this Note id:278422.1
    We are unable to find this proifle option : HZ: Data Sharing and Security Enabled profile
    we are using applications 11i.
    please help to find this Profile option.
    But with this note id:ID 395136.1
    This is Working.
    Query for HZ: DQM Synchronization Method profile. Set the value to Disable.
    But iam facing proble while uploding data to DFF ,Error--SQL exception occurred during PL/SQL upload.
    Thanks for the Support-
    Sowmya.
    Edited by: user13419037 on Aug 11, 2011 11:53 PM
    Edited by: user13419037 on Aug 12, 2011 12:03 AM
    Edited by: user13419037 on Aug 12, 2011 3:45 AM

Maybe you are looking for