Tag Info

Hot answers tagged

9

Providing you are using SharePoint 2010, you can move the files, with history, using the 'Open with Windows Explorer' functionality.


8

If you want to create a folder, you have to specify its name in the leafName parameter. change your code to : foreach (SPListItem reparto in reparti.Items) { var folder = dl.Items.Add( dl.RootFolder.ServerRelativeUrl, SPFileSystemObjectType.Folder, "Test" ); folder.Update(); } If it can help, here a ...


7

I solved this by using a CamlQuery directly after creation to return folders with the same name as a ListItemCollection: SP.CamlQuery query = new SP.CamlQuery(); query.ViewXml = "<View Scope='RecursiveAll'>" + "<Query>" + "<Where>" + "<And>" + ...


7

I would suggest you create different content type or use the tagging feature to organize the items. Check this for the list of Pros and Cons http://social.technet.microsoft.com/wiki/contents/articles/16166.sharepoint-2013-using-folders.aspx Folder vs Metadata SPS 2013 search makes it easy to find worthwhile files and list items with or without any added ...


6

Or "Content Type" is equal to "Folder":


6

If you want a super user to be able to change logos etc, or if the logo is specific to a site collection, place them in a subfolder in /Style Library/Images/. However often you dont want the layout files of your page, or your CSS for that matter, to be changed by end users. This is a good reason to place them somewhere in the v\TEMPLATE\LAYOUTSfolder. These ...


6

You most likely mean a folder inside a document library, because you cannot add a folder to a site that is available for end-users. In order to add a folder inside a document library, you need to open up the ability to add a folder to the document library. Go to the document library where you want to add a folder Go to the Library Settings Advanced ...


5

I think the best solution is to open the document library in an Explorer window (using WebDav) and move or copy stuff around that way. You could also use the Site Content and Structure site action (you need to have the publishing feature enabled on your site) and select all the documents in the folder and move them to a new folder. But this tool is not able ...


5

Try not calling clientContext.Load, for example this works for me: var folder = list.RootFolder; clientContext.Load(folder); clientContext.ExecuteQuery(); folder = folder.Folders.Add("Folder 1"); folder.Folders.Add("Folder 2"); clientContext.ExecuteQuery();


4

Based on your last comment I create a webpart to show the Document List on a certain page, and then I applied a filter on a column content to show only certain documents. But in that way the folder structure is lost and all documents are shown flat. I think I can answer your your question now. If you create a new view and select in the ...


4

The rules are "very simple" (see the full KB article here), which is why you should alway use SPUrlUtility to check filenames. Except about folders and files: Folder names •You cannot use the following characters anywhere in a folder name or a server name: ◦tilde ◦number sign ◦percent ◦ampersand ◦asterisk ◦braces ◦backslash ◦colon ...


4

In brief, just don't use XsltListWebPart on Application Pages. And here are some summarized explanations: XsltListViewWebPart and other OOTB SharePoint webparts (especially complex ones), apparently just aren't supposed to work in Application Pages environment. In other words, they weren't tested there and thus their operability is not guaranteed. This ...


4

Every user who should see the + Add Document link are the users who have at least contribute access to that particular list. Please verify that all your users who should have the add link have that permission. Here's a walk through trough: (1) Access the list all items by clicking the header link. Your URL should end with <list name>/AllItems.aspx if ...


4

For SPQuery, use SPQuery.Folder to define the folder: SPFolder folder = list.RootFolder.SubFolders["Folder 1"]; SPQuery query = new SPQuery(); query.Folder = folder; Then, to define content type, you should include the following condition into your Where clause: SPContentType contentType = list.ContentTypes["MyContentType"]; query.Query = ...


4

This took forever to figure out, but of course it is simple once you got it. Instead of pasting a bunch of code, here is the context and then the raw HTTP POST request that I ended up with. The documentation is actually right here: http://msdn.microsoft.com/en-us/library/dd962796(v=office.12).aspx Syntax for the slug header is as following: ...


4

As long as you reseal it again, as you do, I do not see a problem. Here's a snippet regarding the purpose of sealing: Sometimes, you want to make absolutely sure that someone can’t go in and change your content type via the Windows SharePoint Services user interface. If an administrator were to delete or rename columns in your content type this ...


4

In 2013 (but not in 2010 as you say) you can nest Document Sets. So then the only differences is the fancy WelcomePage and the possibility to add Shared Metadata between the document set it self and all contained files. And as you write, the fact that you do not have version history on folders, but on Document Sets. More about document sets from TechNet ...


3

I am not sure you can do that with folders, but should consider using Document Sets because they do share metadata with subitems. About documents sets Document Sets is a new feature in SharePoint Server 2010 that enables an organization to manage a single deliverable, or work product, which can include multiple documents or files. A Document Set is a ...


3

Consider using Chris O'Brien's Sharepoint Content Deployment Wizard: http://www.sharepointnutsandbolts.com/2007/12/introducing-sharepoint-content.html It can be found on CodePlex.


3

The filter that worked for my library view... to show only "ABC" related folders and documents is shown below. Remember that SharePoint appears to be unix-based in that things are case-sensitive, so where "Folder" worked in the below filter, "folder" did not. Also note that, since most users who are creating folders don't apply categories, I used the "Name ...


3

If you copy it using the Manage Content Tool from Site Actions doesn't that maintain the old copy and its history where it is? If you are only moving one or two files I wouldn't think you'd need more than that.


3

If you created the view in code you will need to specify the Scope="Recursive" ViewAttribute Some examples are given here http://sharepointmagazine.net/technical/development/writing-caml-queries-for-retrieving-list-items-from-a-sharepoint-list If you created the views with the SharePoint UI you will need to Modify the view. Expand the "Folders" section ...


3

I'm assuming you have users setting up their own alerts, so you can't really handle this as the alerts are created, but you can change the behavior of existing alerts programatically. I would recommend iterating through SPWeb.Alerts, check each SPAlert object to see if it's scoped to your list (alert.AlertType == SPAlertType.List && alert.ListID == ...


3

You could create a column that would represent all of your topics. This could be a choice column that you would use to edit the properties of the discussion. Then, you could create a view that groups all discussions based on their topic. You will have the same data all automatically categorized. For the hierarchy, a message can only be created when you ...


3

It looks like folders aren't offically supported by Microsoft within Document Sets. See the Document Sets planning (SharePoint Server 2010) From the document: Folders are not allowed in document sets, and metadata navigation cannot be used in a Document Set There may be an unsupported way, but it will likely cause problems.


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

How about something like this: public static Folder EnsureFolder(ClientContext ctx, Folder ParentFolder, string FolderPath) { //Split up the incoming path so we have the first element as the a new sub-folder name //and add it to ParentFolder folders collection string[] PathElements = FolderPath.Split(new char[] { '/' }, ...


3

How to create Folder (including nested) via CSOM in SharePoint /// <summary> /// Create Folder (including nested) client object /// </summary> /// <param name="web"></param> /// <param name="listTitle"></param> /// <param name="fullFolderPath"></param> /// <returns></returns> public static Folder ...


3

How to get current Folder client object via CSOM (JavaScript) function get_currentFolder(OnSuccess,OnError){ var context = SP.ClientContext.get_current(); var web = context.get_web(); var currentFolder = web.getFolderByServerRelativeUrl(decodeURIComponent(ctx.rootFolder)); context.load(currentFolder); context.executeQueryAsync( ...



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