Copy files using modules to sub site in sharepoint

Hi Team
copy files using modules to sub site in sharepoint 

Hi,
Here is an example of the Elements.xml file for a module:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="Module1">
<File Path="Module1\Sample.txt" Url="Module1/Sample.txt" />
</Module>
</Elements>
More information:
Sharepoint 2013 deploying files using a module to subsites
http://sharepoint.stackexchange.com/questions/79290/sharepoint-2013-deploying-files-using-a-module-to-subsites
Copy file from feature to subsite?
https://social.msdn.microsoft.com/Forums/en-US/83ff07ca-0896-4e98-bd47-b4ffeb9f6ebd/copy-file-from-feature-to-subsite
Thanks,
Dennis Guo
TechNet Community 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]
Dennis Guo
TechNet Community Support

Similar Messages

  • Moving document using workflow from sub site to site collection

    Hi,
    I was looking for steps to move documents from sub sites to site collection or from sub site to sub-site in SharePoint 2013. I tried with reusable workflow but unable to set the target library which is in site collection level. Its not listing down the site
    collection libraries. It is showing libraries in sub site.
    Any ideas how it can be done by workflow? or any other approaches there ?
    Your suggestion would be appreciated.
    Thanks., Prakash

    Hi,
    According to your post, my understanding is that you wanted to move document from one site to another site using workflow.
    There is no out of the box action to achieve it in SharePoint.
    However, there is an avaiable activity Copy List Item Extended Activity in the CodePlex, you can have a look at it.
    http://spdactivities.codeplex.com/
    Note: the activity should be used in the SharePoint 2010 workflow platform.
    We can also use the site content and structure to achieve it(within the site collection ) .
    Make sure you have following features activated:
    Site Collection feature: SharePoint Server Publishing Infrastructure
    Site Feature: SharePoint Server Publishing
    Then go to: Site Actions >> Site Administration>>Content and Structure 
    Please refer to 'Move items' topic in this post
    http://office.microsoft.com/en-us/sharepoint-server-help/work-with-site-content-and-structure-HA010131723.aspx
    What’s more, we can also achieve it programmatically.
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/139e54de-bfa3-47b2-a56b-641830f76a0c/move-folders-and-items-across-diferent-sites-collections?forum=sharepointdevelopmentprevious
    http://www.codeproject.com/Articles/408817/Workflow-to-copy-a-file-from-one-site-to-another-s
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • List all users with full control on a SharePoint 2013 Sub site from SharePoint Object Model in C#

    If I have a sub site URL and a user with Site Admin, can I list all users in that sub site that have Full Control at that level?
    Any C# code sample?

    Still you can do that, just pass the subsites to your code and from their you can find the users dynamically.
    You could also use SPWeb.Users property to get users assigned to a subsite
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.users(v=office.15).aspx
    alternatively you can also use SPWeb.SiteUsers to get all users
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.siteusers(v=office.15).aspx
    other APIs of help-
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.associatedmembergroup(v=office.15).aspx
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.associatedownergroup(v=office.15).aspx
    http://sharepoint.stackexchange.com/questions/101671/object-model-list-all-users-with-full-control-on-a-sub-site-in-sharepoint-2013
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • How to deploy file using module in existing document library ?

    Hello,
    I have picture library where I want to upload image using module
    Location is "asset-library/PublishingImages/Images"
    PublishingImages - Picture Library
    Images - Folder name under PublishingImages picture library
    I have added via module as below :
    <!-- Image Files Start -->
    <Module Name="WebFiles" Url="/asset-library/PublishingImages/Images" Path="WebFiles\Images" >
    <File Path="newContent.jpg" Url="newContent.jpg" Type="GhostableInLibrary" />
    </Module>
    <!-- Image Files End -->
    However when I activate the feature , it throws below error
    The URL '/asset-library/PublishingImages/Images' is invalid.  It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.
    while URL is correct - would you please suggest where I am wrong ?
    Thanks and Regards,
    Dipti Chhatrapati

    Hi Dipti,
    You simply need the URL attribute of the module as 
    Url="/PublishingImages/Images"
    I am assuming asset-library is your sub site name. and if so it would not be required in URL of module
    Cheers! Kapil Happy SharePointing PS: Please mark the reply as answer if it is what you are looking for.

  • Upload and Copy files using PLSQL.

    Hi All,
    Can UTL package can be used to upload any local data file to server?
    Or is there any in-built package which can be used to upload files to servers and copy files to another directory?
    Thanks in advance.

    Avishek wrote:
    Thanks.
    But i've a requirement to upload and copy files from one directory to another.
    How can i approach?Realize we only know what you post & so far you have posted NOTHING useful.
    How exactly does end user interact with the DB?
    3-tier application?
    EndUser<=>browser<=>WebServer<=>ApplicationServer<=>DatabaseServer
    What OS name & version for client system?
    Handle:      Avishek
    Email:      [email protected]
    Status Level:      Newbie (5)
    Registered:      Jun 3, 2008
    Total Posts:      68
    Total Questions:      27 (16 unresolved)

  • Problem Copying Files using Drag and Drop in Finder

    When I try to copy files from a camera's SD disk into a folder in Finder, it always seems to copy the files to some other location other than the folder I drag and dropped to. And then, when I try to redo the drag and drop, I get a message that these files already exist in the desired folder, even though I don't see them there!
    Also when I create a new folder in Finder, it never places the new folder under the folder I've currently highlighted.
    I'd love to hear whats going on here!
    Ted

    tedpratt wrote:
    When I try to copy files from a camera's SD disk into a folder in Finder, it always seems to copy the files to some other location other than the folder I drag and dropped to. And then, when I try to redo the drag and drop, I get a message that these files already exist in the desired folder, even though I don't see them there!
    What Finder "view" option are you using, List, Icons, Columns, or Cover Flow, for this question and the one below? Are you dragging those photos onto the icon of a closed folder or somewhere else? Please describe the exact process that you're executing.
    Also when I create a new folder in Finder, it never places the new folder under the folder I've currently highlighted.
    When you say "under", do you mean "within"? A new folder will be placed in the folder that's open.

  • How to generate an EXCEL file using module parameter??

    Hi,
    I ha ve a file to file scenario, where the output file format will be EXCEL. I know this is possible using Module Parameters. But I can't find a helpful blog.
    So please help me. Its urgent.
    Thanks in advance,
    Dwaipayan De

    Hi,
    Now excel file is generating. But the file is containing only the header part. I have used the following XSLT code :-
    <?xml version="1.0" encoding="utf-8"?>
    <?mso-application progid="Excel.Sheet"?>
    <xsl:stylesheet version="1.0"
    xmlns:html="http://www.w3.org/TR/REC-html40"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns="urn:schemas-microsoft-com:office:spreadsheet"
        xmlns:o="urn:schemas-microsoft-com:office:office"
        xmlns:x="urn:schemas-microsoft-com:office:excel"
        xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
        <xsl:template match="/">
            <Workbook>
                <Styles>
                    <Style ss:ID="Default" ss:Name="Normal">
                        <Alignment ss:Vertical="Bottom" />
                        <Borders />
                        <Font />
                        <Interior />
                        <NumberFormat />
                        <Protection />
                    </Style>
                    <Style ss:ID="s21">
                        <Font ss:Size="22" ss:Bold="1" />
                    </Style>
                    <Style ss:ID="s22">
                        <Font ss:Size="14" ss:Bold="1" />
                    </Style>
                    <Style ss:ID="s23">
                        <Font ss:Size="12" ss:Bold="1" />
                    </Style>
                    <Style ss:ID="s24">
                        <Font ss:Size="10" ss:Bold="1" />
                    </Style>
                </Styles>
                <Worksheet ss:Name="Page1">
                    <Table>
                        <xsl:call-template name="XMLToXSL" />
                    </Table>
                </Worksheet>
            </Workbook>
        </xsl:template>
        <xsl:template name="XMLToXSL">
            <Row>
                            <Cell>
                                <Data ss:Type="String">SupplyOfficeCode</Data>
                            </Cell>
                            <Cell>
                                <Data ss:Type="String">WorkOrderNo</Data>
                            </Cell>
       <Cell>
                                <Data ss:Type="String">ApplicationNo</Data>
                            </Cell>
       <Cell>
                                <Data ss:Type="String">ApplicationType</Data>
                            </Cell>
                            <Cell>
                                <Data ss:Type="String">ApplicantName</Data>
                            </Cell>
                            <Cell>
                                <Data ss:Type="String">DateOfIssueOfWO</Data>
                            </Cell>
                            <Cell>
                                <Data ss:Type="String">ApplCreationDate</Data>
                            </Cell>
                            <Cell>
                                <Data ss:Type="String">WorkOrderStatus</Data>
                            </Cell>
                            <Cell>
                                <Data ss:Type="String">DateOfCanOfWO</Data>
                            </Cell>
            </Row>
            <xsl:for-each
                select="//Record">
                <Row>
                    <Cell>
                        <Data ss:Type="String">
                            <xsl:value-of select="SupplyOfficeCode" />
                        </Data>
                    </Cell>
                    <Cell>
                        <Data ss:Type="String">
                            <xsl:value-of select="WorkOrderNo" />
                        </Data>
                    </Cell>
      <Cell>
                        <Data ss:Type="String">
                            <xsl:value-of select="ApplicationNo" />
                        </Data>
                    </Cell>
      <Cell>
                        <Data ss:Type="String">
                            <xsl:value-of select="ApplicationType" />
                        </Data>
                    </Cell>
      <Cell>
                        <Data ss:Type="String">
                            <xsl:value-of select="ApplicantName" />
                        </Data>
                    </Cell>
      <Cell>
                        <Data ss:Type="String">
                            <xsl:value-of select="DateOfIssueOfWO" />
                        </Data>
                    </Cell>
      <Cell>
                        <Data ss:Type="String">
                            <xsl:value-of select="ApplCreationDate" />
                        </Data>
                    </Cell>
      <Cell>
                        <Data ss:Type="String">
                            <xsl:value-of select="WorkOrderStatus" />
                        </Data>
                    </Cell>
      <Cell>
                        <Data ss:Type="String">
                            <xsl:value-of select="DateOfCanOfWO" />
                        </Data>
                    </Cell>
                </Row>
            </xsl:for-each>
        </xsl:template>
    <xsl:template match="GetWorkOrderDetailsinEXCEL">
    </xsl:template>
    </xsl:stylesheet>
    In the communication channel, full message is passing(including header and body part). But when the excel file is generating, it is containing only the header part. No message body is present there.
    Please help me to solve this proble.
    Thanks and Regards,
    Dwaipayan De

  • Applying ACL's when copying files using SBM protocol

    I' need to change the default behaviour of CMSDK when I'm copiying a file with Windows Explorer using SBM protocol in this way :
    When I'm copiying a file from some branchs of my tree of directories I want that ACL to apply is the ACL of the original file and not the ACL of the user who is doing the copy. For instance:
    Original file --> 'FILEA' with ACL 'AclA'
    User --> 'Pepe' default ACL 'Acluser'
    Copied file --> 'FILEB'
    CMSDK will copy the 'FILEA' to 'FILEB' with ACL 'Acluser', but I need that ACL of 'FILEB' is 'AclA' and not 'Acluser' ( from the original file FILEA).
    How could I get this ?.
    Thanks.

    This is no possible with SMB protocol. Ask for bug 1672091 to Oracle Support.

  • Unable to copy file using Zen 4 Console One

    Hi,
    I get the following error message:
    'Could not configure workstation for application [SPSS Activator license
    update.spss 14.Testing.PSM Applications.Applications.Resources.CF] (id=2).
    Problem: Unable to copy file
    \\MAINCF5G\apps\appwinxp\SPSS14\licenseupdate.bat. (D018)'
    I click OK.
    So I am trying to copy a single file named licenseupdate.bat from the server
    \\MAINCF5G\apps\appwinxp
    to the local C: drive to directory C:\Program Files\SPSS 14.
    The directory already exists on the PC.
    Under Distribution Options: Application Files, I have set Copy if Newer.
    Under Run Options Environment, I have set Run as Unsecure System User (as
    the user trying to install does not have Admin rights to workstation).
    Changing to Run As Normal doesn't work either.
    Any idea what the problem is?
    Thanks,
    Paul

    On Wed, 09 Aug 2006 15:40:24 GMT, Paul McGeoghan wrote:
    > Any idea what the problem is?
    > Thanks,
    file rights to the file, wks or user associated?
    Marcus Breiden
    If you are asked to email me information please change -- to - in my e-mail
    address.
    The content of this mail is my private and personal opinion.
    http://www.edu-magic.net

  • Copy files using Terminal

    I have my Windows XP computer and my Mac connected. I would like to copy files from my Windows HDD to the Mac HDD with the help of terminal. I just know a few things here, "ls /Volumes" to view the Mounted Volumes and "cp" is to copy.. I need a specific command to place it in a path..

    Terminal and Unix oriented commands are best asked in the Mac OS X Technologices -> Unix forum
    <http://discussions.apple.com/forum.jspa?forumID=735>
    And you want
    man cp
    man ls
    That should get you going. I'm assuming that since you mention /Volumes, that you already have the Windows share mounted on your Mac.

  • Site collections, or sub-sites, in SharePoint Online?

    We have an established SharePoint 2010 intranet portal, which has many and various team sub-sites.  These sub-sites are created on request - sometimes it's because one of our locations wants their own little area to share documents, or it might be for
    a company-wide project or initiative.
    We are now slowly moving over to SharePoint Online.  Mainly, it's to replace Box and Dropbox (which some teams use), and allow our staff to share files externally if needed.  Nothing special, just a document library.  More often than not,
    each site will have its own unique permissions.
    Now, our SharePoint 2010 site is one large site collection (wasn't my idea).  As an administrator, that makes my life quite easy as it's one content database, one set of content types, etc.  But, with SharePoint Online, I don't need to think about
    content databases, and won't be using custom content types with these sites.
    So, I'm a bit stuck.  My options, as I see it, are:
    One large site collection (pretty much a no-go as these shared files might get quite large)
    One site collection for each request, no questions asked (which might lead to hundreds of site collections)
    Create a site collection for each office location, and then a sub-site for each team in that location (as requested) - and also create a site collection for each company-wide function, and create a sub-site for each project within that function
    Can anyone give any pointers towards the "best" option to use here?

    it always depends on different things. 
    One of the key elements I always use to decide site vs site collection is security boundary.
    If the target site has a high level of confidentional information, I prefer a dedicated Site collection.
    If it is just a smaller team (or broader team) to share info with you can easy use sub sites.
    Looking at the boundary & limits is also wise to do. (like the 5000 item treshold in a view on a document library)
    A document library should in practice not really be used for multiple teams, however it is possible. A lot of dl's within a site is also not that intuitive for a lot of end-users.
    A office location can be use, however, a lot of work is done across office locations. (now or in the future)
    One site collection per each request is not by definition a bad thiing... however please be in control (governance) of the owners. For example let a site collection owner every x months acknowledge that he/she still needs that site collection or that it
    can be removed.
    One Large site collection is asking for trouble in the end. however for a publishing intranet only it can be good.
    Good luck with your choice for your environment!
    You can also contact me if you want to discuss more on this topic.
    Michiel Hamers www.SharePointman.nl Don't hesitate to contact me for a SharePoint/O365 question.

  • How to make sub sites in SharePoint 2010 as Read Only

    Hello,
    We have a requirement to make sub site as read only in SharePoint 2010 programmatically.
    How we can achieve it using Server Object Model ?
    Thanks,
    Hatim

    Hi,
    You can write a WinForm program, and use
    SPSecurableObject.BreakRoleInheritance method to achieve your requirement.
    More information for your reference:
    http://fangdahai.blogspot.com/2012/09/how-to-set-sub-site-in-read-only-mode.html
    https://social.msdn.microsoft.com/Forums/en-US/1f836da6-88ea-4d88-9e43-3383d139ca01/what-is-the-idea-of-stop-inheriting-permission-from-parent-site?forum=sharepointdevelopment
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Move Documents from a site to a sub site with SharePoint on Office 365

    Good Morning,
    I am trying to configure my Content Organizer Rules to send documents uploaded in one site (e.g. contoso.sharepoint.com/DropOffLibrary) to a library in a sub site (e.g. contoso.sharepoint.com/testSite/destintionLibrary). I have turned on the Content Organizer
    for both sites, checked the setting that "<label for="ctl00_PlaceHolderMain_enableCrossRoutingSection_crossRoutingCheckBox">Allow rules to specify another site as a target location", and </label>ensured the content type was
    on the Drop Off Library and the destination library. The Content Type was a custom type that included custom columns.
    I created a rule based upon one of those columns that sent the document to the correct library (site) based upon the choice made. The column did not accept any value except the choices provided. When I try to enter the destination for the document,
    the sub-sites are not listed as options to select and neither are the libraries contained within them. When I enter in the URL for the targeted library, the message "A valid target path must be selected." appears. If I create the same rule,
    targeting the local library, it works.
    Any ideas on why this is not working for me?

    Hi Zac,
    In order to route documents from one site to another, please make sure you have set up a send to location in Records Management in SharePoint admin center for the destination site.
    For more information, you can refer to the blog;
    http://office.microsoft.com/en-in/sharepoint-server-help/implement-records-management-HA102893868.aspx
    https://social.technet.microsoft.com/Forums/office/en-US/239374eb-f617-48eb-b2c6-6aefaa810145/content-organizer-rule-a-valid-target-path-must-be-selected?forum=sharepointgeneralprevious
    http://office.microsoft.com/en-in/sharepoint-server-help/create-content-organizer-rules-to-route-documents-HA102772939.aspx
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Hide the Notification Bar in my sub site in Sharepoint Online

    Hi All,
    I have this annoying notification or status bar right at top of my Team Site that continuously displays the message - 
    This site can be shared with people outside this organisation. Learn More
    When I click the learn more option it says that the site is shared with external users. I am the
    site collection admin but i can't see external user invitation feature anywhere in the
    site collection features which means that external sharing has been
    disabled by admin (correct me if i am wrong). So anyways I am not able to hide this hideous notification from niether my parent nor my sub site.
    Is there a way to hide this notification only at the subsite level ? If not is there any way to hide this notification at the parent site itself ?
    Any help is much appreciated.
    Thanks

    What to can do if it gets really annoying for the small amount of time it's there you can go to settings the notifications and turn them off. Or quicker do not disturb but that turns all off text every thing hope I helped :) 10 points please.

  • Is there any limitations in Finder when copying files using clipboard?

    One day I was moving my photos from one folder to another and accidently discovered that not all of my files are copied!
    What I was doing (I'm using Finder):
    - Go into folder
    - Cmd+A to select all files
    - Cmd+C to copy them into clipboard
    - Cmd+V to paste them in new location
    Every folder contain about 10k files, but (I did some checks) copy operation copied only 2-3k. Every time different amount.
    It was so unexpected!
    Does anybody know what does it mean??

    There is no clipboard limit that I'm aware of. I have copied folders containing tens of thousands of files with no problem. Seems like a bug in the OS.
    Just a question, why are you copying your files when you could just drag&drop them from one folder to the other?

Maybe you are looking for