Tag Info

Hot answers tagged

28

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) ...


11

A library is "just" a special type of list where the focus is on the File linked to the listitem Anything you can do with a list you can do with a library and then some


7

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, ...


7

The default setting for SharePoint 2013 is two days, which you can check using this script: $WebApp = Get-SPWebApplication http://portal $WebApp.DaysToShowNewIndicator 2 You can change the number of days the same way: $WebApp.DaysToShowNewIndicator = 5 $WebApp.DaysToShowNewIndicator 5 Reference: NEW INDICATOR IN SHAREPOINT LISTS AND LIBRARIES – NUMBER ...


5

Great Info! In an attempt to make a more exhaustive comparison (because none exist!) here are a couple of things left out: List list attachments are not indexed. This has a lot of implications. When searching, you cannot use the refiners to narrow down the doc type List attachments will not work with the eDiscovery feature No location based default column ...


5

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 ...


5

Why not open the site in IE, open the library using "Open in Explorer Mode" from the ribbon, select all, right click and choose Properties, that should give you the actual size.


5

This is a file that's located on the server's file system. Microsoft definitely doesn't recommend changing this file for the following reasons: Having multiple web front ends means you will have to change the page layout on each of these servers. If the different servers are using different files on their file system, different users will get different ...


4

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()


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

Your example contains the following errors/typos: To get fs object type use the following syntax: var fsObjType = selectedItem.get_fileSystemObjectType(); Another point is, ListItem object have to be requested first before getting it's value, this is why in your example it will not work. In fact, you don't have to request ListItem object in order ...


4

Can't you just click the actual link instead?


3

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> ...


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

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 ...


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

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, ...


3

you can create a new column to use as your filter say Sr# and assign the number to this column. Change the values according to the order, by which you want to display the items. Edit the view and Sort by this column name.


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

I created this simple PowerShell script to calculate for a single Document Library what the size in MB is for all the files inside: $total = $null; ((get-spweb http://WebApplication/SiteCollection/subsite/).lists | Where-Object {$_.title -eq "Library Title"}).items | foreach {$total+= $_.file.length}; $total /1MB Before you can use the script you need to ...


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]; ...


3

Use a Custom Action with Location="ScriptLink" and inject jQuery/JS on the fly, which hides or uncheck the button by default


3

This one provides a little more info than Mike's (again, replace web URL and list name). I'm outputting to a text file because you said there's 32000 folders, I doubt you want to scroll through 32000 lines of window buffer: $TestSPSnapin = get-pssnapin | ? { $_.Name -eq "Microsoft.SharePoint.Powershell"} if($TestSPSnapin -eq $null){ add-pssnapin -Name ...


3

Hello Spideynok and welcome to SharePoint Stack Exchange. The simple answer to your question, is that you can indeed access documents without having the Microsoft Office Suite installed using "Office Web Apps". Please see the TechNet link below, which will guide you in setting up and viewing some videos on the functionality. Per Microsoft, When used ...


3

Using a phone input device can be tricky. Either you use the mobile views where you see the libraries in a row or you switch to PC view using the more menu . . . If I try to upload using the upload button I can’t hit the button even if it’s there. But if I go to the ribbon and upload from its Upload button, it works as expected. Try these three different ...


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)



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