Tag Info

Hot answers tagged

17

Although in most of the UI and API they can be manipulated the same way, there are some significant differences between Lists and Libraries. The latter is a specialized type of the former. Lists: Can have attachments Have major versions only Do not have Check-in/Check-out features Libraries: Cannot have attachments (files are directly in the library) ...


4

You can't push the file to the client from the server. The server side has no knowledge of the client side. You have to write a client application, that will pull the file. First, you'll have to know the url of the file. Then, a simple var wc = new WebClient(); wc.UseDefaultCredentials = true; wc.DownloadFile(targetFile, @"c:\temp\myfile.txt"); would ...


4

Simple answer: you can't. You are thinking of SharePoint as if it is a file system, which it is not. To organise content into "folders" you'd need to create subwebs and move libraries there. But the wiser thing to do would be to correctly assign content types and metadata to your documents, then use search to find what you need. I know this is a very ...


4

You need to retrieve SPWebApplication.DaysToShowNewIndicator and the build a query to retrieve documents created within that number of days. For more code see Getting the list of new items from code


4

You only see the last error because Set-Content overwrites the existing content, use Add-Content instead. If you want to have a more encompassing approach, like Robert suggested, there's a more PowerShell'y (?) way of doing this with Start/Stop-Transcript which takes all console output between the Start & Stop cmdlet calls and outputs it to a file.


4

The code loops through entire site and gives the size of all document libraries. [System.reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”) [System.Reflection.Assembly]::Load(“Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”) [System.Reflection.Assembly]::Load(“Microsoft.SharePoint.Portal, ...


3

Its because the Home.aspx (may be another page in your case) is set as a welcome page for the library root folder. Below should fix it $web = Get-SPWeb "http://site" $list = $web.Lists["Site Pages"] $rootfolder = $list.RootFolder $rootfolder.WelcomePage = "Forms/AllPages.aspx" $rootfolder.Update() Write-Host $list.RootFolder.WelcomePage $web.Dispose()


3

If your client code is running on server which means that request is being sent from server and your file will eventually downloaded on server. I would recommend you to write a code which runs on your computer and download the file from Server. You can Lists.asmx or OOTB Web Service to download the file from the Server.


3

Edit the permission of the list and set the access level accordingly, you can even give permission to only a few user to a list or library. You can find list permission under list settings. I would recommend creating a group if you need this set of user in some other place also, otherwise if you know that you have to use this permission set only for a ...


3

The versioning in SharePoint is tracking Major (published with everyone, everything having 1.0, 2.0, etc.) and/or Minor (X.1, X.2, etc.). According to how you have setup Versioning via the List/Library Settings you would have Major or Major and Minor. In both cases when you limit versions, basically the OLDEST are deleted, so you would 0.1, 0.2, 0.3 as ...


3

So, when you reference a dll created in a different project and reference it in your SP project, you need to add it to the Package. To make Visual Studio adding 3rd party assembly or even your own assembly from other project in solution to GAC please do next: Open Package.package from Package folder in SharePoint project. Click Advanced in bottom area. ...


3

$RootFolder.SubFolders will give you the collection of folders. Loop through the collection and use StartsWith with each folder: $folders = $RootFolder.SubFolders; foreach ($folder in $folders) { if ($folder.Name.StartsWith("a")) { // Call $folder.Subfolders again to get folders present in this folder // Then use foreach to loop ...


3

Those groups will not be able to access the folders if the permission for the folder is broken and only the group "XYZ" has permissions to the folder and rest all are removed. UPDATE Sample powershell code: $folders = $list.Folders foreach ($spFolder in $folders) { $PermissionLevel = "PermissionName" ; $group = $web.SiteGroups[$GroupName]; ...


2

I would also use the calculated column. It's the most easy solution... Also, if you use jQuery and you migrate to a newer version of sharepoint it could be that your jQuery won't work anymore. (+ you could get a visible change for users with slow computer > since you run this client-side)


2

Just put the html file containing the markup into the module as normal, don't specify any properties other than title, it will use the deault content type. <Module Name="myModuleName" SetupPath="SiteTemplates\SPS" Url="Pages" > <File Path="default.html" Url="default.html" Type="GhostableInLibrary"> <Property Name="Title" ...


2

Try this: $web = Get-SPWeb -Identity http://inside.site.be/Tools $list = $web.GetList("http://inside.site.be/Tools/site_candidate/") $folderquery = New-Object Microsoft.SharePoint.SPQuery $foldercamlQuery = '<Where> <Eq> <FieldRef Name="ContentType" /> <Value Type="text">Folder</Value> ...


2

Yes it is very much possible. This is a by "design" feature that SharePoint Foundation provides us. Follow these links for the same : http://nickgrattan.wordpress.com/2007/11/27/permission-inheritance-and-folders/ http://office.microsoft.com/en-us/sharepoint-server-help/manage-permissions-for-a-list-library-folder-document-or-list-item-HA010021564.aspx


2

You will need to display a page with this link: http://hostname/_layouts/upload.aspx?List={ListId}&RootFolder={RootFolder}&ContentTypeId={ContentTypeId}&Source={Source} If you go into list settings -> advanced, you can turn off dialogs. Then you can see the url that the "New Document" does UPDATE Is this sort of what you want: ...


2

The simple approach would be to create a list in a site, define the fields you wish to keep track of (title, ISBN, abstract, etc). Then make sure that all of the people that you wish to be able to use the list have 'Contribute' permissions. If the library is self-managed then require checkout to modify an item. Then, the user can merely 'Check out' the ...


2

You can. You'd want to create a document library with no default content type specified and then create and add your content types to the library by setting the Manage Content Types option to Yes in the Advanced Settings of the library. Then you'd just need to figure out how you would group things together in your library so that the docx and mp4 file ...


2

Edit: That dialog cannot be changed for an individual library. It's the default new page dialog for the whole site collection. You would need to write code to change that. Out of the box, just create the page, then click the Page ribbon and use the "Edit Properties" command to set the required fields. In this question a code solution is linked, but it ...


2

To create a Document library: New-SPList -Web http://spwebaddress -ListTitle “Enter Title Here” -ListUrl “ListURL” -Description “Description” -Template “Document Library” To upload to a folder within document library you should get the spfolder then add to it... $folder=$web.GetFolder(“FolderName″) $folder.Files.Add($folder.Url + “/” + $file.Name, ...


2

Aren't they in the masterpage gallery? Can you just copy one from there and insert into your library of choice? EDIT: Only relevant if you're talking code, just seen you're talking 2013, and thus the web interface. In which case there's a Wiki Site Feature to let you create wiki and WP Pages I think.


2

I wouldn't recommend trying to manipulate the SharePoint InfoPath viewer, I would insert any code needed directly into the InfoPath form template before publishing to SharePoint. From there you can setup your pre-populate conditions among other things. Beware however, web enabled InfoPath forms cannot do everything that regular InfoPath forms can do. It all ...


2

You can use Site Content and Structure to move items from one list to another list. On the Site Content and Structure page, select the item or multiple items to move. Click Actions, and then click Move. In the Move dialog box, select a destination and then click OK. The source items are validated to ensure that they are compatible with the ...


2

You can map a network drive to a SharePoint Library. Here is a tutorial Here is another one Behind the scene, it uses WebDAV to communicate with SharePoint. If you just want to push some files, this may be a good solution. Afterwards, you just need to put your reports in the network drive. And by the way, a workflow is not a good solution for this ...


2

If you enable the content approval you also need to enable major and minor versions in order to work. Doing so will create a new view on the Pages Library that is called "Approve / Reject" where all the wiki pages are listed that have pending approvals or have been rejected. For the permission level: There is one permission level that is called approve. ...


2

Use SPList.BaseTemplate property as shown in sample code below: SPList list = web.Lists[ListGUID]; if (list.BaseTemplate == SPListTemplateType.DocumentLibrary) { //Document Library } else if (list.BaseTemplate == SPListTemplateType.GenericList) { // Custom list }


2

#region global variables SPListItem item_disp; SPWeb source_web; SPWeb destination_web; bool flag1 = false; bool flag2 = false; #endregion protected void Page_Load(object sender, EventArgs e) { using (SPSite site = new SPSite(SPContext.Current.Site.Url)) { try { ...


2

In general you should't be storing documents of big size in SharePoint. A better approach would be to store it on a file share or FTP and simply link to the file from SharePoint. You technically cannot store a file larger than 2 GB (2047 MB) to SharePoint. This is the maximum size. If you want to allow files up to 2 GB you'll need to increase the connection ...



Only top voted, non community-wiki answers of a minimum length are eligible