Folders
2 TopicsHow do I promote the files from a subfolder into each parent folder for 1000+ folders
Hi, I have the following folder hierarchy. There are over 1000 folders each for a different company. I need to put the files from the child folder, into each of the parent folders. (see example below). Rather than cut and paste each of the files (there's like 16,000++ files) I would like to run a command or program to do this. But I can't find anything that will work. (Folder) Company ABC File A File B File C (subfolder) Attachments File Z File Y (Folder) Company DEF File AA File BB File CC (subfolder) Attachments File ZZ File YY And what I would like it to look like is (Folder) Company ABC File A File B File C File Z File Y (Folder) Company DEF File AA File BB File CC File ZZ File YY Thank you for your attention.1KViews0likes3CommentsGet all OneDrive for Business folders recursively
I have a litte problem. I'm migrating OneDrives between Office 365 tenants. In the receiving end they require that all documents have a major version. In the orginating end there are a few users that have turned on Minor versions i the versioning settings. This requires me to check-out and check-in files to raise all files to major version. . Using Office 365 Dev PnP PowerShell CmdLets (SharePointPNPPowerShellOnline) I created this little nifty function. Function checkin-allfiles { [cmdletbinding()] param ( [Parameter (position = 0,HelpMessage = 'The Folder Site Relative URL (/Documents)', Mandatory = $TRUE)] [String]$FSRU ) $files = Get-PnPFolderItem -FolderSiteRelativeUrl $FSRU -ItemType File foreach ($file in $files) { Set-PnPFileCheckedOut -Url $file.ServerRelativeUrl -Verbose Set-PnPFileCheckedIn -Url $file.ServerRelativeUrl -CheckinType MajorCheckIn -Comment 'Checked In with Script to raise version to major' -Verbose } } My problem is recursively running this function on all subfolders. Can anyone help me out?11KViews0likes2Comments