none
Moving list items between folders

    Question

  •  

    Is it possble to move a list item between folders in the same list. I can't fond how to do this?

    Monday, July 30, 2007 9:41 PM

Answers

  • As Dink mentions in the previous post, you get the "The selected cells are read-only" error when you try to paste data into a system generated/read only field (e.g. Type, Created By, Created etc).

     

    When copying & pasting large amounts of data between lists, or between folders in a list, I find it useful to create custom datasheet views in the source & destination lists that only display the columns that you need to copy.  These columns are all editable - i.e. not system generated/read only.  You also need to make sure that the column ordering in both views match.  If your destination list is the same as your source then you only need the one custom datasheet view.  Using this technique you can copy & paste all rows of data from the view at once. 

     

    To tell whether a column is read-only, select a cell in the regular datasheet view.  If it is read only, then a read only status will appear in the bottom right corner of the datasheet view.

     

    To copy the data in your scenario you would:

    1. Create one view containing all the columns that you want to copy, ensuring that none are read only.
    2. Open two browser windows, one displaying the source folder and one displaying the destination folder.
    3. View both folders in the newly created custom datasheet view
    4. Select all the items in the source folder & click copy
    5. Select the first cell of the first available row in the destination folder and click paste
    6. All your items should be copied successfully.  Once you have verified that the data has been successfully copied to the destination folder, you can then delete the rows from the source folder.

    This works great as long as you don't need to copy any of the system generated content.  If you need to retain the data in the Created By field for example, then the solution would be more involved & could be as simple as creating a custom Author field to paste the Created By data & using List Views/Dataview Web Part to display the content, or could involve writing code.

     

    Hope this helps,

    Emer

    • Marked as answer by Mike Walsh FIN Saturday, January 09, 2010 10:52 AM
    Thursday, May 22, 2008 7:18 AM

All replies

  •  

    Bump.

     

    Anyone?

    Monday, August 13, 2007 11:08 PM
  • Are you trying to move the documents via code or through the GUI?

     

    Eli

    Tuesday, August 14, 2007 1:06 AM
  • Not that I have found.  Sad  I have looked a couple of times with no luck. 

     

    Shane - SharePoint Help

    Tuesday, August 14, 2007 3:42 AM
  •  Eli Van Eenwyk wrote:

    Are you trying to move the documents via code or through the GUI?

     

    Eli

     

    A GUI would be great.

     

    I guess I could live with writting a crappy little c# app to do it. Wierd it seems like such an obvious thing to want to do.

     

    /_layouts/sitemanager.aspx offers the ability to move items between lists, but not between folders within a list??
    Tuesday, August 14, 2007 10:26 PM
  • I'm in Moss 2007

     

    So eventhough sitemanger has the feature to move documents it really does not work?

     

    I am trying to move a document between two folders and getting FILE NOT FOUND error..

     

    any way around this?

    Monday, May 19, 2008 4:40 PM
  • Assuming you want to move list items between folders in a document library, have you tried using the Explorer View? Usually works for me.

     

    Cheers,

    Christian

     

     

    Tuesday, May 20, 2008 6:33 AM
  •  

    I'm trying to move List items between folders under the same list using sitemanager. I've installed Publishing Infrastructure under the Collection Settings and no longer get file not found error.. instead now I get an error :

     

    Attempt to move url failed. try again.

     

    If I try the same between two different Lists it works. So this issue only appears to be when moving items between folders under the same List.

     

    I don't believe Explorer View can move/copy individual List items.

     

    BTW, I'm on MOSS 2007.

     

    Thanks

    Tuesday, May 20, 2008 2:15 PM
  •  

    JCNET,

    From what I've seen when attempting the same, is that the sitemanager will only allow you to move items from one document library to another...you cant use it to move items within the same document library (it always throws an error stating this).

     

    You can however, use the explorer view (in the actual library) to move individual items as needed. 

     

    For example, if you have an item in the top-level of the library and want to move it to a sub-folder, go into explorer view and simply drag-and-drop the item into the target folder and it will be moved.  If you want to go the other direction (move from a subfolder into the top-level, or into a sibling subfolder), you'll have to either open two windows (to perform the drag-and-drop), or go into explorer view and "cut" the document, then navigate to the target location, go into explorer view and "paste" it in (you can also do this from a "Network Place" on your computer which accomplishes the same task, but also includes functionality to move "up" in the navigation since it's treated as a normal folder on your computer).

     

    Hope this helps,

     

    - Dink

    • Proposed as answer by Nohopuku Wednesday, January 06, 2010 5:55 PM
    • Unproposed as answer by Mike Walsh FIN Saturday, January 09, 2010 10:51 AM
    Tuesday, May 20, 2008 5:46 PM
  • Thank you.

     

    But does explorer view work with Lists? I can't seem to pull it up while in a list.

     

    I'm trying to move a list item to another folder within the same list.

     

     

    Tuesday, May 20, 2008 8:34 PM
  • I think there may be some confusion as to what type of list you're using...can you post back with if this is a default list, custom list, and/or if this is a document library you're working with?

     

    I think part of the problem is that since you mentioned "folders", it was assumed that you're were working with a library, not a "list".  In MOSS 2007 and WSS 3.0 for example, you can use folders in the "links" list to help organize the list items...even though it's not a library, which can become confusing at times.

    The Explorer view however, is not available for lists - only for libraries, which again because of the confusion as to what you were actually using, has lead to the suggestions of using this view to move the items (assumed "items" meant "documents") from one folder to another.

     

    Within a list, the problem is that the folders are all part of the same entity, and even though they can be thought of as "branches" or navigational nodes (whatever other term fits as well), the items on the list are all contained together regardless of the folder structure used, which as a result will not allow you the ability to move them from one folder to another because in a sense, you'd be copying it to itself (sorry, cant think of an easier way to explain it).

     

    One option you could do however, is to create a datasheet view and do a manual "cut(copy) / paste" on the items - this does work.  It may not be the best approach, especially if you have a large number of items to move around, but at least it will save you the time of having to go back in a duplicate everything to the target location.

     

    Hopefully this helps some,

     

    - Dink

    Tuesday, May 20, 2008 9:02 PM
  • It's a custom list with folders underneath it to organize items. Moving items should really be more user friendly and intuitive. Copy/paste sounds kinda primative but I'll give a shot to see how that will work with folders.

     

    Thnks for the info!

     

     

     

    Wednesday, May 21, 2008 3:34 PM
  • Update on this.. I just did a test. Created a datasheet view of my list with folders. cut an item from one folder and attempted to paste it in another from the view...

     

    On paste I get an error:

     

    the selected cells are read-only.

     

    Either I don't know what I'm doing (which is possible) or Microsoft needs to build in some common sense functionality.
    Wednesday, May 21, 2008 3:57 PM
  •  

    One thing to check is if you have "Content Approval" turned on for the list...I've seen this cause that problem.

     

    Aside from that, I'm not too sure what could be causing the behavior.  Could you post the configuration of the list so I can try and duplicate the same problem? (Sample of the fields you're using with some sample data as well...also include any custom configurations within MOSS - one of them may attribute to this problem)

     

    In an "Out of the Box" configuration I'm able to (cut) copy items between folders without any "Read-Only" errors, so if I can setup a custom list using the model you have, I may be able to determine what is causing the problem and see if there's a work-around.

     

    - Dink

    Wednesday, May 21, 2008 5:00 PM
  • content approval is Off.

     

    Sorry, but I don't think this is configuration problem. I have three very  installs of MOSS2007 and all three are giving me the "read only" error during paste in the datasheet row.. and I'm able to manually add rows in the datasheet view of the lists for the same row I could not paste into.

     

    You actually pasted into the datasheet row and it works? do you select the row before you paste into it? Does the row have the * for new?

     

    Thanks.

     

    Wednesday, May 21, 2008 7:01 PM
  • Ok, well...I had to ask on the "Content Approval" and configuration side of things just to make sure.

     

    For me, I've tried several times on different lists and have been successful each time whenther its been through a custom "Datasheet" view, or by using the "Edit in Datasheet" option from the "Actions" menu (both do the same thing).  The one thing that you must do when copying the row is to select only the cells you want copied and not the entire row, or it will most likely throw either the "Read-Only" error you've been seeing, or a "You cannot perform this operation on an attachment field" error.

     

    Here's an example of what I did to both produce the error you've been seeing, and to actually perform the paste operation successfully:

     

    Created a custom list.

    • Added in 3 fields
    • first: "single line of text" not required
    • second: "single line of text" required
    • third: "Choice" with three options, not required

    Through the default view, I then added in a couple new items with some of the optional fields filled in and a couple without (just to test to make sure that "Required" vs. "Not Required" didnt affect the ability to modify in DataSheet).

     

    Next, I created a custom DataSheet view.

     

    Next, I created a subfolder (after enabling it through the list "Advanced Settings").

     

    Next, I went to the custom view to see the test items in a DataSheet view.

    In the view, I see the first column (sorting column), a "Type" column specifying if the item is a folder or "item", the default "Title" column, and my additional 3 custom columns.

     

    To copy to the subfolder:

     

    Starting from the "Title" field, I click and drag-to-select the 4 total columns on the row I want to copy, then do a "Ctrl+C" to copy the row's data.  Then I click on the folder icon for the subfolder to go into the folder.  Once in the folder, I select the "Title" column and do a paste ("Ctrl+V") and the row is now copied.  If I then go back and choose the default "AllItems" view, I can now see the record has indeed been copied and now exists in both the top level and the subfolder.

     

    To cut an item from one location to another (top-level to subfolder, subfolder A to subfolder B, etc.) do the exact same thing, but after selecting the cells and copying - click on the grey cell for the row (far left column) to select the entire row then hit "delete" (a popup will ask you to confirm), then proceed to the target location and paste as mentioned above.

    The reason for this is that it wont let you leave the view until you either delete the row or place something back into it.

     

    The above does work providing that you only select the cells you want to copy and not the entire row.

     

    Now, to get it to fail and throw errors, one of a couple things has to have happened.

    First, if you try and select the entire row (selecting from the leftmost column - the gray background column), different errors will present themselves depending on the selected cell you try and paste into.

    • Pasting into the same column (in your target location, subfolder etc.) will now throw the "The selected cells are read-only" error.
    • Trying to paste into the next cell (the "Sort" or "Attachment" column) will throw a "You cannot perform this operation on an attchment field" error.
    • Trying to paste into the "Type" column will also throw the "Read-Only" error.
    • Lastly, if you try and paste into any of the other cells, you now see a "The information cannot be pasted because the paste area is not completely on the list.  Paste into a different cell or try inserting more columns or rows into the list." (this error refers to the fact that the selected columns you copied to not directly match up with where you're trying to paste them).

     

    So again, the way that you'll have to copy the items is make sure that you only select the cells that you want and nothing else (only select the cells you would normally fill-in through the "New Item" form since they're the only one you can directly edit)...and make sure that when pasting, you paste back to the starting cell from your copy (as in the "Title" column from my example).

     

    Give it a shot again noting the cells you're trying to copy and post back with the results.

     

    - Dink

    Wednesday, May 21, 2008 10:52 PM
  • As Dink mentions in the previous post, you get the "The selected cells are read-only" error when you try to paste data into a system generated/read only field (e.g. Type, Created By, Created etc).

     

    When copying & pasting large amounts of data between lists, or between folders in a list, I find it useful to create custom datasheet views in the source & destination lists that only display the columns that you need to copy.  These columns are all editable - i.e. not system generated/read only.  You also need to make sure that the column ordering in both views match.  If your destination list is the same as your source then you only need the one custom datasheet view.  Using this technique you can copy & paste all rows of data from the view at once. 

     

    To tell whether a column is read-only, select a cell in the regular datasheet view.  If it is read only, then a read only status will appear in the bottom right corner of the datasheet view.

     

    To copy the data in your scenario you would:

    1. Create one view containing all the columns that you want to copy, ensuring that none are read only.
    2. Open two browser windows, one displaying the source folder and one displaying the destination folder.
    3. View both folders in the newly created custom datasheet view
    4. Select all the items in the source folder & click copy
    5. Select the first cell of the first available row in the destination folder and click paste
    6. All your items should be copied successfully.  Once you have verified that the data has been successfully copied to the destination folder, you can then delete the rows from the source folder.

    This works great as long as you don't need to copy any of the system generated content.  If you need to retain the data in the Created By field for example, then the solution would be more involved & could be as simple as creating a custom Author field to paste the Created By data & using List Views/Dataview Web Part to display the content, or could involve writing code.

     

    Hope this helps,

    Emer

    • Marked as answer by Mike Walsh FIN Saturday, January 09, 2010 10:52 AM
    Thursday, May 22, 2008 7:18 AM
  •  

    Thank you . That worked...

     

    Though we finding there is a limit to the number of folders deep before the dataseet stops allowing edit.

     

     

    Thursday, May 22, 2008 3:46 PM
  • Hi

    Is there a way to Copy / Move / Delete items in a custom list automatically, say like a workflow?

     

    Thanks.

     

    Thursday, May 29, 2008 5:53 AM
  • Yes, you can use SharePoint Designer to create a workflow & use the Copy List Item action.

     

    Hope this helps,

    Emer

     

    Friday, May 30, 2008 9:35 AM
  • Update: If you are working with document libraries you can use the Content & Structure page, accessible from the Site Settings -> Site Administration page.  To move data between folders.  The great thing about this method is that it maintains the system data such as Created By etc.  Another great thing about this method is that if you are copying/moving data between lists/document libraries you do not have to define the custom fields in the destination liust in advance - SharePoint will do it for you automatically.  The unfortunate thing about this method is that it does not seem to support folders when they are in a List as opposed to a document library.

     

    That said, when you want to copy or move list data between lists & want to maintain system data such as Created By etc, you can use the Content & Structure page.  Once again, folders only work for doc libraries.

     

    To use move/copy feature on the Content & Structure page:

    1. Navigate to Site Settings -> Site Administration -> Content and Structure
    2. Navigate to your source list
    3. Select all the items you wish to copy/move (if you click the header field it will select all items)
    4. Select the appropriate action & you are good to go. 

    Hope this helps,
    Emer

    Friday, May 30, 2008 10:06 AM
  • In which version of WSS does the Content and Structure page appear? I can't find it on WSS 3.0.

     

    Wednesday, June 18, 2008 8:54 PM
  •  

    John,

    The Content and Structure page is only available in MOSS2007 (unfortunately).  WSS 3.0 does not have it.

     

    - Dink

    Wednesday, June 18, 2008 8:59 PM
  • Thanks. I was afraid of that.

     

    Wednesday, June 18, 2008 9:02 PM
  • So, from what I'm understanding here is that you can move some stuff within a list to a

    subfolder in the same list, but a list item with an attachment cannot be moved within the same list. I have tried multiple ways (most of which you've discussed) to do this, but unsuccessful. It's frustrating as you'd think MS would have thought of that since they recommend the subfolder structure for performance reasons.

     

    What about using Folder Content Types...I don't know much about these and maybe it doesn't even matter b/c the list may not look at these, but didn't know if you did folder content types as your subfolders if this would make a difference.

     

    Sorry, I'm reaching here...short of us creating a separate list to move to and do our restructure and trying to stay away from doing it in code as our end users are responsible for this and we'd like to not make it that complicated for them.

     

    Any input on this?

    Tuesday, June 24, 2008 3:04 PM
  • " It's frustrating as you'd think MS would have thought of that since they recommend the subfolder structure for performance reasons".

    I got to the very same point as you did, and I am sure a lot of people stuck with more then 2000 items in a list trying to solve it. Worst of all, Created By field we use very much, and it is very frustrating to have Folders in a custom list without a Copy/Move commands. Like haveing a car without brakes...
    Friday, June 26, 2009 8:30 AM
  • Yes, it can be done.

    Try Adding new network locations in Computer.

    My example:
    - open computer, right click and choose Add a Network Location
    - Click next when the Add Network Location Wizard comes up
    - Click Choose a custom network location
    - Type the address of the document library (example for me: http://developmentserver/Document Library/ and click Next
    - Give the location a name, Next then click Finish
    - You will now be able to see the folders in the library
    - Then you can open up each of the folders in 2 separate Explorer windows and drag and drop the files as needed


    This allows you to easily move files between folders within the same list and it will update in SharePoint as well.

    Friday, June 26, 2009 2:44 PM
  • Hi,

    For document library it is ok, but for custom lists it does not work.
    Monday, June 29, 2009 12:13 PM
  • In Explorer view, the drag and drop in VISTA won't work but if I right click and wait for a warning message "Running a system command on this item might be unsafe.  Do you wish to continue?" - acknowledge, then select 'Cut', open the folder and right click (same message/action) and then select 'Paste' followed by same message and finally it is moved.  This may be a result of settings on our company PCs, but it does work.
    Wednesday, January 06, 2010 6:01 PM
  • Hi
    You can move a list using a list template.

    1. Save the list as a template from the source list (make sure to include the contents)...save the template file on your local machine.
    2. Import the template to the list templates gallery on the source site.
    3. Create a list from the newly imported template.
    4. Delete the template from the list templates gallery if you no longer need it.

    Much easier...and like everything else that can be done through the UI.


    I hope this will help you.

    Thanks
    Http://codeintellects.com
    Saturday, January 09, 2010 9:32 AM
  • hi -

    i've blogged about a powershell script that'll allow you to automate this below 

     http://sharepointstruggle.blogspot.com/2010/07/sharepoint-vs-powershell-moving-list.html

     

    Saturday, July 17, 2010 12:34 AM