List All Folders, Subfolders, and Files by name and path

I am using python with the sharepy module to make requests to sharepoint. I would really like to know to get get all of the folders, subfolders, and files of a sharepoint site via a http request. I can list folders and files like so:

r = s.get(spo_site + """_api/web/GetFolderByServerRelativeUrl('""" + root_folder + """')/Folders""") 

But it need it to go deep into the folder structure to get the relative urls and names of the files and folders. I would think this would be possible considering most sites have an export to excel button. The reason I want to do this with code because I need to go through a bunch of sites. Please Help.

In my Ubuntu18, by mistake i have deleted python folders from /usr/lib ? If i run command “sudo apt-get install –reinstall python” then not working

This is what i got after sudo apt-get install –reinstall python

Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies:  python : PreDepends: python-minimal (= 2.7.15~rc1-1) but it is not going to be installed           Depends: python2.7 (>= 2.7.15~rc1-1~) but it is not going to be installed           Depends: libpython-stdlib (= 2.7.15~rc1-1) but it is not going to be installed  python3-gi-cairo : Depends: python3-gi (= 3.26.1-2ubuntu1) but 3.26.1-2 is to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). 

Even after ” sudo apt –fix-broken install” it says

 Preparing to unpack .../python3-gi_3.26.1-2ubuntu1_amd64.deb ...  Could not find platform independent libraries <prefix>  Could not find platform dependent libraries <exec_prefix>  Consider setting $  PYTHONHOME to <prefix>[:<exec_prefix>]  Fatal Python error: Py_Initialize: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings' 

Sharing a OneDrive and/or sharepoint folders using “Sharing Link” Vs adding user directly to the Folder permission

I am planning to move some folders from a user’s OneDrive site to a SharePoint document library. to move the files and folders from OneDrive to SharePoint online i will use the “Copy To” and/or “Move To” options. but for the permission i am planning to do the map manually. But on some OneDrive folders i found that they have been shared using sharing link + adding users directly to the folder, here is an example (where 7 users have been added to the folder permission, while one user is added using sharing link):-

enter image description here

and when i checked the permission for a file inside the above folder, i found the following permission settings, which mentioned that the file inherits the permission from its parent folder (the above permission), and the 7 users are showing inside the file permission settings, as follow:-

enter image description here

So the file got all the 7 users from the parent folder , but excluding the user who is granted access to the parent folder using sharing link. so my question will the user who has been granted access to the parent folder using sharing link, can access the file? because the child permission setting is confusing, as it is saying that it inherit the permission from the parent folder, but it does not include the user who can access the parent folder suing sharing link.. so not sure how i need to map this to the sharepoint folder? should i grant the user who can access the parent folder using sharing link, access to the file inside the folder?

Thanks

Q: Set Folder’s path according to it’s title in a list with SPFx

I am creating a folder inside a List with the following code:

TypeScript import {sp} from "@pnp/sp";  const shpList = sp.site.rootWeb.lists.getById(ListId);  shpList.items.add( {   Title: folderName,   FileSystemObjectType: 1,   ContentTypeId: '0x0120',   FileLeafRef: folderName,   DisplayName: folderName } ) 

And it does create the folder, but the navigation displays 130_.000 as the folder. (It’s the item’s ID plus underscore, dot and three zeros)

Is there a way to create the item so it uses the title as the navigation?

Is there any place I can look for the default properties of SharePoint?


Here a list of the properties I have already tested:

  • Name (and name) | value: folderName | result: error (not registered property)
  • FileRef | value: folderName | result: Does not seem to do anything
  • Path (and path) | value: folderName | result: error (not registered property)
  • Folder | value: folderName | result: error (primitive value not null)
  • Url (& url & URL) | value: folderName | result: error (not registered property)

Object returned by the following call stack is null. ListItemAllFields AddWithOverwrite Folders

I am working on Migration tool using SharePoint CSOM from file system to sharepoint, Everything was working fine until now i face new exception on some of the folder as mentioned below.

Cannot invoke method or retrieve property from null object. Object returned by the following call stack is null. ListItemAllFields AddWithOverwrite Folders at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream) at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()

on below line

CreatedFolder = ParentSPFolder.Folders.AddWithOverwrite(DestPath, true); 

I have already read below questions but not matching my case.

Cannot invoke method or retrieve property from null object. Object returned by the following call stack is null. \"File\r\n\"

Server Exception : Cannot invoke method or retrieve property from null object. Object returned by the following call stack is null. \“File\r\n\”

Can you please guide me whats wrong with the code.

Thank You.

Folders with .js files that I didnt create are in my pictures directory windows 10, virus?

About a month ago, two folders appeared in my /pictures directory named:

Ready To Glare 🔪 (@ReadytoglareYT) _ Twitter_files and Lawrence’s stream mom _ funhaus_files . Inside the folders are .js.download files, html files, .jpg files, and .png files, _api files(whatever that means), etc.

I didnt create them and never witnessed this type of behavior before. I tried a virus scan with Comodo Antivirus, Kasperski antivirus, and malwarebytes. They didnt find anything.

I cant find anything that would explain this on Google.

Anyone have any idea how this could have happened?

enter image description here enter image description here

Sharepoint page not opening folders in web parts

I have a web page that has a couple of document libraries as web parts. All the libraries has folders with documents in them. On the main page, I can not open any of the folders. I can go directly to the library and the folders open fine. The error I get when trying to open the folders from the main page is.

The “XsltListViewWebPart” Web Part appears to be causing a problem. Value does not fall within the expected range.

I even created a new web page and new libraries. Still happens on the new page and library. Any Ideas?

I am on Sharepoint 2016 Standard edition on premise.

Thank you!

16.04 replacing folders instead of merging them

When I try to copy a folder into a directory where an older version of that folder already exists, say when backing up a folder to an external hard drive, this window pops up:

enter image description here

Is there a way to also have a Replace option? Because merging will keep all the files in the older folder that I have deleted in the newer one, which is not always preferable.

I use Ubuntu 16.04 with Cinnamon and Nemo as the default file manager.