Hot answers tagged

3

Sample demo: const query = `<Where> <Eq><FieldRef Name="File_x0020_Type"/> <Value Type="Text">json</Value> </Eq> </Where>`; const xml = '<View Scope="RecursiveAll"><Query>' + query + '</Query></View>'; sp.web.lists.getByTitle('MyDoc2')....


3

OneDrive for Business and SharePoint Online Document Libraries support the same functionality in terms of co-authoring, versioning, and a few other features. There's no reason you couldn't work out of both, but the intention of each product is different. OneDrive for Business is designed for your 'personal' work documents, with occasional sharing and ...


2

Finding differences between two csv files is not an OOB capability of SharePoint. SharePoint could host the files, and you could use JavaScript to read and compare the file contents.


2

As fox has answered using REST API, I would like to add via JSOM(way you have coded). Pointing out issues in your code. First you should load the onenote_file and run executequeryasync once to get your file object method then call moveTo method Second is SP.File.moveTo which is static method, you have to use File(as your object name is File), Below is ...


2

Try using your REST API something like below: siteUrl/_api/web/lists/getbytitle('Library Name')/items?$select=Title,FileLeafRef&$orderby=Modified desc&$top=5 Or if you want to get the files from specific folder then try using below: siteUrl/_api/web/GetFolderByServerRelativeUrl('/sites/Site Name/Library Name/Folder Name')/Files?$select=FileLeafRef,...


2

You can use this cmdlet : Get-PnPFile Get-PnPFile -Url fileUrl -AsFile


1

A caml query will be enough to make the script delete files in a specific folder according to date. $site = new-object Microsoft.SharePoint.SPSite("site url") $web = $site.rootweb $list = $web.Lists["library name"] $query=new-object Microsoft.SharePoint.SPQuery $caml='<Where> <Leq> <FieldRef Name="Created" /> ...


1

Use the "Get File Properties" action, it takes the FileID from the "For Selected File" trigger as the input to get the rest of the metadata.


1

If you're planning to use SharePoint Online, Microsoft purchased mover.io which has connectors for (S)FTP to help you perform that migration.


1

Since you only need the urls of the files, and not the content, you can use the following code for your getFilesInFolder method and it should do the trick: public static void getFilesInFolder(List list) { CamlQuery query = CamlQuery.CreateAllItemsQuery(); query.ViewXml = "<View Scope=\"Recursive\"><Query><Where><Eq><...


1

Based on the error message (and on command WordprocessingDocument) I assume You are trying to get content of Word documents. Problem is following - DOCX type of documents are OpenXML based so they can be opened as an archive file (for example, with 7zip) and will contain a lot of XML files and relations. This article by Stepan Yakovenko has good cover on ...


1

Try below endpoints and see which suits best for your use: 1) Using FileLeafRef property: /_api/web/lists/getByTitle('<library title>')/items?$select=FileLeafRef 2) Using File/Name property: /_api/web/lists/getbytitle('<library title>')/items?$select=File/Name&$expand=File 3) Using Folder/Files property: /_api/web/...


1

In the Library in question, go to "Library Settings" then "Advanced Settings" in there you should see the option to open in browser, i.e. Word Online, or open in client application, i.e. Word Client application.


1

We can use Open XML SDK to create Office documents, then using SharePoint client object model File.SaveBinaryDirect Method to upload the document to folder in SharePoint library. Example code: string siteUrl = "https://tenant.sharepoint.com/sites/lz"; var login = "lz@tenant.onmicrosoft.com"; var password = "xxx"; var documentLibrary = "DL0627"; var ...


1

You can upload documents to SharePoint libraries using the Object Model or SharePoint Webservices. Upload using Object Model: String fileToUpload = @"C:\YourFile.txt"; String sharePointSite = "http://yoursite.com/sites/Research/"; String documentLibraryName = "Shared Documents"; using (SPSite oSite = new SPSite(sharePointSite)) { using (SPWeb oWeb = ...


1

There is no such fix number for files to upload inside a folder. For SharePoint Online: According to the Microsoft's official documentation: Service limits for all plans. Items in lists and libraries - A list can have up to 30 million items and a library can have up to 30 million files and folders. After 100,000 items are added to a list, library, or ...


1

ItemDeleted Event will trigger after the file has been deleted, if you want to get file which will be deleted, use ItemDeleting instead: SharePoint Remote Event Receiver – Item Deleting – Using Provider hosted App


1

Use ItemDeleting event instead of ItemDeleted if you want to get the file which is to be deleted. For ItemDeleted event List Item properties are not available. SharePointEventReceiver


1

If you want to trigger file delete event, we need use remote event receiver with CSOM to achieve it. If you only want to delete a file in SharePoint Online document library in client side, we can use PowerShell with CSOM or PnP PowerShell to achieve it. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web ...


1

If you do not want to bother with a sharing link. The easiest way shall be opening the file and copy the URL in the browser. The copy link action gives you sharing link is a by-design behavior.


1

Got your question. Getting the link is a bit tricky, especially if you have Modern settings enabled for your library. What you can do is just open the document in the browser and share the link directly with your colleague. Your colleague can then access this document . Make sure your colleague has read access on this file , so that he can open it too.


1

There are multiple ways you can get the link of document file from Library. If you are going to share just the URL of file (assuming access is already has been given) to your colleague then you can open the file and copy the URL from browser. That should work.


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