Hello,
We can use PowerShell to find the root drive and create subfolders. The following is an example:
- Find the root drive:
$rootDrive = Get-PSDrive -PSProvider FileSystem | Where-Object { $_.Root -eq "D:" }
- Create a subfolder:
$folderPath = "$($rootDrive.Root)NewFolder"
New-Item -Path $folderPath -ItemType Directory
This script first finds the root drive (D:) and then creates a subfolder called "NewFolder" under the root drive.
Reference: Working with files and folders - PowerShell | Microsoft Learn
———————————————————————————————————————
If the Answer is helpful, please click "Accept Answer" and upvote it.