Copying subfolders to new folders with same superfolder names

Please feel free to direct me to past forum posts that have addressed this question, but I haven’t been able to find them so far.

I’d like a code I can use in Terminal that allows me to accomplish the following, but can scale to more folders. tfMRI_SOCIAL_RL is the folder being moved.

firstdirectory/1/MNINonLinear/Results/tfMRI_SOCIAL_RL –> seconddirectory/1/MNINonLinear/Results/

firstdirectory/2/MNINonLinear/Results/tfMRI_SOCIAL_RL –> seconddirectory/2/MNINonLinear/Results/

firstdirectory/3/MNINonLinear/Results/tfMRI_SOCIAL_RL –> seconddirectory/3/MNINonLinear/Results/

Thanks very much, Brandon

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.

Bash – Copy all .jar files to current directory from subfolders

I have folder named datahub and it has 15 folders and more than 20 subfolder which holds .jar files. I wanted to find all .jar files from subfolders and copy back to my current directory.

I am referring Bash – create zip by finding files but this is copying subfolders as well, but i wanted to copy only .jar’s to my current directory or to create one directory and copy to it.

Thanks in Advance for your help Venkat

powershell script to list all sub-folders in an Outlook Inbox

New powershell user here. I want a list of all folders and subfolders and subsubfolders etc. from an Outlook Inbox

Add-Type -assembly "Microsoft.Office.Interop.Outlook" $  Outlook = New-Object -comobject Outlook.Application $  namespace = $  Outlook.GetNameSpace("MAPI") Get-ChildItem -Directory $  namespace 

The term ‘FileInfo’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

How to get write permission for folder and subfolders

In my Visual Studio code on ubuntu 19.04 I have created a folder with some content with a CLI tool called expo. However, my sudo user jonas does not seem to have rights to write to this folder since I have to verify password every save. Which is extremely daunting.

I have already tried the answer of

How can I give full permission to folder and subfolder

sudo mkdir /var/szDirectoryName sudo chmod a+rwx /var/szDirectoryName 

This is the output in the terminal

jonas@jonas:~/Projects/javascript-questions-flow3$   sudo chmod a+rwx /home/jonas/Projects/javascript-questions-flow3/react-native-flow-3 jonas@jonas:~/Projects/javascript-questions-flow3$   ls -l total 140 drwxr-xr-x   4 jonas jonas   4096 jun 10 11:36 backend drwxrwxr-x 246 jonas jonas  12288 jun 10 23:19 node_modules -rw-rw-r--   1 jonas jonas   1216 jun 10 23:19 package.json -rw-r--r--   1 jonas jonas 103310 jun 10 23:19 package-lock.json drwxrwxrwx   6 jonas root    4096 jun 11 01:07 react-native-flow-3 -rw-rw-r--   1 jonas jonas   9586 jun 10 16:40 README.md jonas@jonas:~/Projects/javascript-questions-flow3$    

I expected the rootin react-native-flow-3 to change to my user as the rest. How can I give jonas sudo write access to this folder?

Ubuntu server 18.04 command to delete contents of sub-folders ever 6 months

I have a folder that contains many different sub folders and files in the sub folder

home/customer/main/a home/customer/main/b (each letter a through z is a random variable folder name example: house,media, etc ) i want to be able to clean the files in the folder after one of those files have reached 6 months of age but leave the folder system intact. and have this automatically run once a month