Batch uploading to a document library with content types

Hi,
I have a document library with two content types. Now I need to upload documents to this document library. However, if I have large number of files, then uploading through web UI is a pain as metadata will not be attached. How should I automate it  from
my computer using powershell without relying on Administrator to run the powershell script. Or is there any other way to do it without using powershell? or  can powershell be run remotely from an end user computer?
Note I am using SharePoint 2010.

Hi,
According to your post, my understanding is that you want to butch upload files to document library with content types.
There are two good tools in CodePlex which can batch upload files with content types, you can have a look at them.
DocMetaMan : Bulk document Upload and MetaData (Taxonomy) Setter
SharePoint Multiple File Upload Script
There are some third-party tools which can achieve the same scenario, you can refer to it.
http://sharepoint.stackexchange.com/questions/74694/uploading-multiple-files-with-metadata
Thanks,
Jason
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
[email protected]
Jason Guo
TechNet Community Support

Similar Messages

  • How to deal with Upload limit of Document Library

    Hi
    We are working on SharePoint Online (Office365). We have a requirement to upload files of 20GB+ size. I have come across a limitation that we can't upload files to document library whose size is more than 2GB. Please provide an clarification on this
    limitation.
    We want our user to upload files up to 20GB. Can we give him an option to upload file using SP Designer. If we can create a folder an user can open site in SPD then they can upload files. Is there any limitation of file size in folder.
    If this is not the feasible option kindly suggest us any other way by which we can fulfill this requirement.
    Regards
    Vikrant Kaushal

    Vikrant,
    Please see the SharePoint Online Boundaries and Limits document
    http://office.microsoft.com/en-gb/office365-sharepoint-online-enterprise-help/sharepoint-online-software-boundaries-and-limits-HA102694293.aspx#_SharePoint_Online_for_2
    The 2Gb file limit is a hard limit that cannot be exceeded in either on-premises or cloud based versions of SharePoint due to a SQL/File system limitation.
    The best bet that you can do is look at using a storage location based in perhaps Azure and then linking to this location from Office 365. Unfortunately you can't use search crawl for none Office 365 locations, so I would think about using a links list to
    surface the large files in SharePoint as a link item, thus making them available to search etc.
    Paul 
    Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.

  • Corrupt document gets created in document library with document template using createlistitem workflowaction in visual studio workflow for office 365 solution

    Hi,
    My requirement is to create a document library associated to a custom content type with a document template associated. Also I need to create a document based on the template in this document library when a new item is created in another list by taking the
    reference ID of that new Item , I need to create the document with the name appended by ID. I need to do all this deployment using WSP.
    I have created document library with document template associated to content type by following instructions in below stated blog :http://blogs.msdn.com/b/chaks/archive/2011/05/19/deploying-a-document-template-file-in-content-type-in-a-office365-sandboxed-solution.aspx
    This works perfect for me.
    However, there are few observations, when going to Document Library > Library Settings > Advanced Settings > Document Template section - doesnt shows the Edit template link. When tried to look at the value for the document template using view source
    , it is giving me /Lists/MyDocsListInstance/Forms/template.dotx instead of the actual template file uploaded.
    Ignoring the above observation, when I am trying to create a sandbox based workflow in visual studio to create document in document library when new item is created in another list, I provide the ContentTypeID as the ID associated with the document library
    with template. 
    It creates the corrupt document at end of workflow. 
    I have tried using .docx instead of .dotx files for workflow as per solution provided in some of the post but it isnt resolving my issue.
    Any help is much appreciated.
    Regards,
    Krutika

    OK, I am going to throw out a lot of ideas here so hopefully they get you closer to a diagnosis. Hang on :)
    Does it happen to work for some users but not others? If so, try logging in on the "good" computer with the "bad" username. This will tell you if the problem is related to the end-user's system. Also, once the user downloads a document
    successfully can they open and work on it in Word? Also, does the document library have any custom content types associated with it or does it just use 'Document'?
    I notice that there are other folks on the web that have run into this same problem and the similarity seems to be that they are either on SharePoint 2007 or have upgraded from 2007. Did this doc library start out as a 2007 library?
    What you might want to do is this: Make a site collection from scratch in 2013 (or find one that you know was created in 2013). Choose team site (or whatever you want) for the root web and set up the security the same way you have it on the malfunctioning
    library. Now, use windows explorer to copy and paste some of the documents to the new location. Be sure you recreate any needed content types. Now test it from the troubled user's computer.
    I'm thinking there may be something that is different about the library since it was migrated through various versions and updates since 2007. I've sometimes found that there can be problems (especially with user profiles but that's a different story) with
    things that go through this evolution.

  • The Create List Item workflow action does not work in document library with document template

    My end goal is more complex but below is a basic example of the issue I’m having that just simply does not work.
    I'm trying to use a site workflow to create an item in a document library that has a document template applied to it but the file that gets created by the workflow is corrupt and cannot be opened.
    I created a document library and edited the document template by adding some text to the header and changing it to a Word docx file instead of a Word dotx file. I tested the document template by clicking the files tab in the ribbon and then clicking new
    document which opens the document template in Word and allows me to edit and save the document back to SharePoint. Then I created a SharePoint 2013 site workflow in SharePoint Designer that contains a single Create List Item action, and that action creates
    an item in the document library with the name field statically defined. I published the workflow and then manually start it on the site. The workflow completes successfully and when I navigate to the document library the document has been created by the workflow.
    When I click on the document to open it in the Word Web App it throws the error pictured below and if I open it in the Word client application it just opens a blank document and not the correct document template.
    I also tried using a SharePoint 2010 workflow with pretty much the same results. Opening the document in Word Web App gives the same error as above and opening the document in the Word client application gives the error pictured below.
    Come on Microsoft creating a Word Document in a SharePoint Document Library from a SharePoint Workflow should just work! Is this a bug or does anyone have any ideas on what is causing the this issue?

    I had the same problem with corrupted document - this worked for me:
    1. Create a 2010 Workflow which creates the list element in a document library
    (you may start this workflow from your 2013 workflow if applicable)
    2. In the Create New List Item properties - make sure to set ContentTypeId to your content type
    ("Id for indholdstype" is Danish for "Contenttype ID")
    3. Your Content Type template should be a ".docx" file - NOT a ".dotx" file...!
    (I have always created my templates for content types as .dotx files - seems Microsoft wants us to use ordinary .docx files as template files for content types)
    Hope this helps you!

  • Issue with site template that contains a document library with a lookup column to another list

    I have a document library called Proposals with a lookup column in the same site called Document Categories (multiple values allowed).  It points to a list called document categories.  I have several sample documents in the Proposal Library that
    contain valid document categories.  When I save the site as a template and instantiate it, everything is fine.  However, when I remove the sample documents from the Proposal library and rebuild the site template, I can't get the  template to
    create another site.  I get an error Unable To Open Lookup List.
    I don't understand why I can instantiate a site from the template when there's sample data, but not when the document library containing the lookup column is empty.
    Does SharePoint 2010 site template support lookup columns?
    Why would it make a difference if the library is empty?
    Thanks

    Hi,
    According to your description, my understanding is that the error occurred when you created a site from the template with no files in the document library.
    I tested the same scenario per your post, and I can create a site from the template with no files in the document library with no errors.
    To solve this issue, I recommend to verify the things below:
    Did you save the site as a template with Include Content checked? If yes, I recommend to test if it works when saving the site as a template with Include Content unchecked.
    Test the same scenario with a new site to narrow the issue scope.
    I also recommend to check the event log and ULS log to see if anything unexpected occurred.
    To check event log, click the Start button and type “Event Viewer” in the Search box.
    For SharePoint 2010, by default, ULS log is at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS.
    You can check the ULS log by the methods here:
    http://blogs.msdn.com/b/opal/archive/2009/12/22/uls-viewer-for-sharepoint-2010-troubleshooting.aspx
    http://msdn.microsoft.com/en-us/library/gg193966(v=office.14).aspx
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Some chinese character file name not uploading in SharePoint Document Library?

    Hi
    Some Chinese character pdf file name not uploading in SharePoint Document Library. I am getting following error.
    1. File not found error if i would upload using file browse option in Doc Lib.
    2. Can't read from the source file or disk. if i would tried to copy and paste using "Open with explorer" options.
    File name is "LA(未签署).pdf"
    Note: This file has been converted from "TIFF" to "PDF".
    Thanks & Regards
    Poomani Sankaran

    Hi Poomani,
    For troubleshooting your issue, please let's verify the followings:
    Whether other pdf file which are not converted from "TIFF" and contain Chinese char could be uploaded into the SharePoint Document library.
    Whether other pdf file which are converted from "TIFF" and don't contain Chinese char could be uploaded into the SharePoint Document library.
    Please upload these pdf files into other libraries, compare the result.
    Please check the log file to find more information about this issue. The path of the log file is:
    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • WORD document becomes blank or corrupted after being uploaded to a Document Library programmatically?

    Hi everyone,
    I uploaded a WORD document to a Document Library with this code:
    using (SPSite currentSite = new SPSite(SPContext.Current.Site.ID))
    using (SPWeb currentWeb = currentSite.OpenWeb("Departments"))
    currentWeb.AllowUnsafeUpdates = true;
    SPList myList = currentWeb.Lists["Commercial Agreements"];
    SPDocumentLibrary myLibrary = (SPDocumentLibrary)myList;
    SPFolder myFolder = myLibrary.RootFolder.SubFolders["aFolderName"];
    using (Stream fStream = FileUpload1.PostedFile.InputStream)
    byte[] _bytes = new byte[fStream.Length];
    SPFile myFile = myFolder.Files.Add(FileUpload1.FileName, _bytes, true);
    The document gets uploaded into the correct folder in the Document Library, however when I open it from SharePoint it is just a blank document. And sometimes it is corrupted and cannot be opened.
    If I upload a PDF using this code, the pdf cannot be opened. It says the file is corrupted.
    Any ideas?
    Thank you very much for your help in advance.
    Lin

    Hello,
    I just written sample code, please try this: (Note: This code is not tested so you might need to modify it)
    Stream fStream = FileUpload1.PostedFile.InputStream;
    byte[] _byteArray = new byte[fStream.Length];
    fStream.Read(_byteArray, 0, (int)fStream.Length);
    fStream.Close();
    string _fileUrl = myFolder.Url + "/" + FileUpload1.PostedFile.FileName;
    SPFile file = myFolder.Files.Add(_fileUrl, _byteArray, true);
    http://www.c-sharpcorner.com/blogs/4250/programatically-add-file-in-folder-in-sharepoint-document-li.aspx
    http://sharepointwings.blogspot.sg/2013/08/programmatically-addupload-file-to.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • External data column as shared column in document library with document sets

    Hello,
    I'm using a document library with document sets. Within this document library i have a External data column called "Project"
    This column has it's columns:
    Project: Installatietype
    Project: Relatie
    Project: Object
    Project: Projectleider
    Project: Status_project
    I wan't to use the external data column as an shared column for my document set(s). But i can't figure out or this is possible.

    Hi,
    According to your description, my understanding is that you want to set the external data column as a shared column in document set content type.
    I tested the same scenario in my environment, and the external data column was not supported to be set as a shared column in document set.
    Here is a similar thread for you to take a look:
    http://social.technet.microsoft.com/Forums/en-US/5488b777-1c18-4895-a264-27802b2cde27/document-set-shared-columns-and-bcs-data?forum=sharepointgeneralprevious
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • What is the size and number of documents we can upload to a document library at one time

    HI
    what is the size and number of documents we can upload to a document library at one time.
    like we have scenario , we developed a custom solution to scan and upload documents to sharepoint sites doc library.
    here we face issues when user try to upload 100 documents with the size of each doc 2-3 MB, at one time.
    adil

    Hi Adil,
    The maximum number and size of documents to upload in a document library is determined by a setting in Central administration. You can go to Central administration -> Application Management -> Manage Web Applications -> Select the Web Application
    -> Click on General Settings in the ribbon. Scroll down and you will see "Maximum Upload Size" section. The maximum value that can be set is 2047 MB. 
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

  • Using Document Library with Baseline

    Hi there,
    I have a specific need with Sharepoint. I have a document library and I want to be able to mark with a tag or generate a baseline for my folders.
    I've already searched on the web, and there is someone doing it just coping and pasting every single file. Is that the better way to get this?
    Thanks,
    Tiago

    Hi Tiago,
    What did you mean "Using Document Library with Baseline" and "generate a baseline for my folders"?
    Did you mean that navigate the document library folders in treeview?
    Did you mean that search or filter multiple folders documents with the same tag (managed metadata column)?
    You may be able to use the "Navigation Hierarchies and Key Filters" for that specified SharePoint 2010 library, here is an article about metadata navigation settings you can check below,
    http://www.sharepointboost.com/blog/understand-and-configure-metadata-avigation-and-filtering/
    Thanks
    Daniel Yang
    TechNet Community Support

  • Apply Information Rights Management to document library with edit permission to site admin or Member Group in O365

    Apply Information Rights Management to document library with edit permission to site admin or Member Group in O365.
    so that one or few limited users can update or edit documents in IRM applied document library

    Hi,
    Based on your description, my understanding is that you want to apply Information Rights Management to a document library.
    Here is a link about how to set up Information Rights Management (IRM) in SharePoint admin center, you can use as a reference:
    http://office.microsoft.com/en-us/office365-sharepoint-online-enterprise-help/set-up-information-rights-management-irm-in-sharepoint-admin-center-HA102895193.aspx
    Here is a link about how to apply Information Rights Management to a library, you can use as a reference:
    http://office.microsoft.com/en-us/sharepoint-help/apply-information-rights-management-to-a-list-or-library-HA102891460.aspx
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Create document library with 2 columns multitext and lookup.

    Remove-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
    Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
    #To which site u want to create the list 
    $spWeb=Get-SPWeb -Identity http://xyz
    #List type or template 
    $spTemplate = [Microsoft.SharePoint.SPListTemplateType]::DocumentLibrary 
    #Get all the lists to the listcollection
    $spListCollection=$spWeb.Lists
    #adding the new list to the list collection
    $spListCollection.Add("Student1","Student1",$spTemplate)
    #get the path of subsite and sitecollecion 
    $path = $spWeb.url.trim()
    #get the list to the list object
    $spList = $spWeb.Lists["Student1"]
    #adding the field type(Note) to the list
    $spFieldType = [Microsoft.SharePoint.SPFieldType]::Note
    $spList.Fields.Add("COMMENTS",$spFieldType,$false)
    $ParentList = $spWeb.Lists.item("Studentlist")
    $spList = $spWeb.Lists["Student1"]
    $spList.Fields.AddLookup("lookupcol",$ParentList.id,$true)
    $spChildListLookupField = $spList.Fields["lookupcol"]
    $spChildListLookupField.LookupField = $ParentList.Fields["ID"]
    $spChildListLookupField.Indexed = $true
    $spChildListLookupField.RelationshipDeleteBehavior = [Microsoft.SharePoint.SPRelationshipDeleteBehavior]::Restrict
    $spChildListLookupField.Update()
    $Views = $spList.Views["All Items"]
    $Views.ViewFields.Add("COMMENTS")
    $Views.ViewFields.Add("lookupcol")
    $Views.Update()
    $spWeb.Dispose()
    I am trying to create a document library with 2 coulmn types multitext and look up but i am getting the following error 
    I am getting erros - You cannot call a method on a null-valued expression - $spList.Fields.Add("COMMENTS",$spFieldType,$false)
    Cannot index into a null array.
    + $spChildListLookupField = $spList.Fields["lookupcol"]
     

    Hi,
    I used the PowerShell you offered to do a test in my SharePoint 2013 and I reproduced your issue. I solved it by doing a little change to the PowerShell which you offered.
    Because you create a document library, the default view of document library is "All Documents" rather than "All Items", just change 
    $Views = $spList.Views["All Items"]
    to
    $Views = $spList.Views["All Documents"]
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Modifying upload.aspx on Document Library

    I am adding a cascading dropdown using spservices (from codeplex). I need to edit the upload.aspx page to enable the cascading dropdown. I created a new customedit.aspx page but can't figure out how to copy and modify the upload page.

    Hi,
    You can consider the solution of Russell Gove which can customize the SharePoint Upload Page on only a certain list :
    https://yetanothersharepointblog.wordpress.com/2012/09/30/customize-the-sharpoint-upload-page/
    http://spcustomupload.codeplex.com/
    Also you can have a look at the other solutions as below:
    https://social.msdn.microsoft.com/Forums/office/en-US/535e9448-0e1e-4b6f-9c56-cb5b133ebacc/redirect-to-a-customuploadaspx-instead-of-the-layoutsuploadaspx?forum=sharepointcustomizationlegacy
    http://byteloom.blogspot.com/2012/01/custom-upload-form-for-document-library.html
    Best Regards,
    Eric
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to Read a Message with Content Type multipart/alternative

    Hi ,
    I need to write a POP3 Client to read email message ..but some times the messages comes with content type multipart/alternative
    how to parse it and read only one of the content :
    for example :
    This is a multi-part message in MIME format.
    ------=_NextPart_000_12C25_01C6B64F.09226B00
    Content-Type: text/plain;
    charset="iso-8859-1"
    Content-Transfer-Encoding: 7bit
    Assignment to workgroup Name 1 : L2 SD Service Delivery Apps Spt
    Open CI Search Code : HPSD
    Description : tesat
    General Information :
    Is the workgroup owner Aware of the addition to Workgroup : Yes
    Workgroup to be added :
    L2 SD Service Delivery Apps Spt
    ------=_NextPart_000_12C25_01C6B64F.09226B00
    Content-Type: text/html;
    charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    <br><P>Assignment to workgroup Name 1 : L2 SD Service Delivery Apps =
    Spt</P>
    <P>Open CI Search Code : HPSD</P>
    <P>Description : tesat</P>
    <P>General Information :</P>
    <P>Is the workgroup owner Aware of the addition to Workgroup : Yes</P>
    <P>Workgroup to be added :</P>
    <P>L2 SD Service Delivery Apps Spt</P>
    <P> </P>
    <P> </P>
    <P> </P>
    <P> </P>
    <P> </P>
    ------=_NextPart_000_12C25_01C6B64F.09226B00--
    The Same message is in text as well as HTML so not sure how to read it .
    currently my program is as follows
    for (int i = 0; i < found.length; i++) {
    Message m = found;
    // Get some headers
    Date date = m.getSentDate();
    Address [] from = m.getFrom();
    String subj = m.getSubject();
    String mimeType = m.getContentType();
    System.out.println(date + "\t" + from[0] + "\t" +
    subj + "\t" + mimeType);
    Object o = m.getContent();
    if (o instanceof String) {
    System.out.println("**This is a String Message**");
    System.out.println((String)o);
    } else if (o instanceof Multipart) {
    System.out.print("**This is a Multipart Message. ");
    Multipart mp = (Multipart)o;
    int count3 = mp.getCount();
    System.out.println("It has " + count3 +
    " BodyParts in it**");
    for (int j = 0; j < count3; j++) {
    // Part are numbered starting at 0
    BodyPart b = mp.getBodyPart(j);
    String mimeType2 = b.getContentType();
    System.out.println( "BodyPart " + (j + 1) +
    " is of MimeType " + mimeType);
    Object o2 = b.getContent();
    if (o2 instanceof String) {
    System.out.println("**This is a String BodyPart**");
    System.out.println((String)o2);
    } else if (o2 instanceof Multipart) {
    System.out.print(
    "**This BodyPart is a nested Multipart. ");
    Multipart mp2 = (Multipart)o2;
    int count2 = mp2.getCount();
    System.out.println("It has " + count2 +
    "further BodyParts in it**");
    } else if (o2 instanceof InputStream) {
    System.out.println(
    "**This is an InputStream BodyPart**");
    } //End of for
    } else if (o instanceof InputStream) {
    System.out.println("***********************************This is an InputStream message**");
    InputStream is = (InputStream)o;
    /* if(m.getContentType().equalsIgnoreCase("multipart/alternative")) {
    MimeMultipart mp = new MimeMultipart();
    // Assumes character content (not binary images)
    } else {*/
    BufferedReader reader
    =new BufferedReader(new InputStreamReader(is));
    String thisLine=reader.readLine();
    while (thisLine!=null) {
    System.out.println(thisLine);
    thisLine=reader.readLine();
    So when the Content TYpe is multipart/alternative it goes into InputStream message .
    any help and ideas to handel such situations ?
    Thanks
    San
    Message was edited by:
    sanrosh_95

    Try reposting that with tags (replace the {'s with ['s).
    Long story short, I think the FAQ and examples would go a long way towards explaining this, but you basically can check the content type, or check if the content contains parts, and parse each part separately.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Trip Co Document posted with value type 11 - Statistical actual

    Dear all,
    Can you please share what caused the CO document posted from Travel Management (tcode: PR05) having value type = 11 Statistical Actual?
    So far all the CO documents posted from Travel Management have value type = 4 - Actual.
    However we have a CO document posted from Travel Management with value type = 11 - statistical actual.
    Question:
    1. What caused the CO document posted with value type = 11?
    2. How to fix/change the value type for this CO document from 11- Statistical to 4 - Actual?
    Thank you very much in advance for your kind assistance.
    Best rgds,
    DTan

    Normally it means that in your CO account assingment there is also another CO object with a higher priority where the real value was posted.  For example if you do account assingment to the Cost Center and Internal order the real object will be Internal order and statistical posting will be at the Cost Center.  Anyway it should be visible within CO document.
    The way to correct it is to reverse and repost, means changing the trip and transferring it again.

Maybe you are looking for

  • Launching Photoshop CS4-  Spaces,

    When I launch Photoshop CS4 from Applications ( ie. not by trying to open an image), I get this window... "Could not complete your request because Photoshop does not recognize this type of file." I can close this window and proceed to open whatever i

  • Webservice to XI. Pls advice urgent

    Hi All, My scenario: Partner A(Webservice) -- XI -- Partner B(Webservice) Partner A do not have Webservice. So for Partner A I will make O/B Interface and make WSDL and export that WSDL to Partner A. Partner B has webservice So I will take webservice

  • HP Photosmart 7960 Not Shown in Print Drivers

    I finally pulled the trigger and bought a MacBook Pro last Monday. I have a lot to learn having come from a PC background. I have an HP Photosmart 7960 printer hard-wired to a desktop PC running Windows XP. I use a wireless network with a Linksys rou

  • Tax software for Mac???

    Hi, everyone. TurboTax offers software for Mac in all additions EXCEPT for "Business" for some unknown reason. In addition, H&R Block's software following exactly the same pattern. Does anyone know of Mac software that can handle a Business tax retur

  • Ipad mini won't stay connected to home network...and I've tried ALL the fixes

    I know other people have been posting this problem, but none of the fixes posted in the forums work for me. No matter whether I restart or reset my mini, it only holds the wifi connection for a few minutes. Then, though it says it's still connected,