In: Computer Science
Suggest an organization of 7 subdirectories for your "Documents" folder. The hierarchy should be at least 2 levels deep. Write and test a PowerShell Script that uses the PowerShell command New-Item (as opposed to using the mkdir command) to create this hierarchy in the current directory, whatever it happens to be. (Hint: for the -Path switch specify a relative, not absolute path)
New-Item -Path "." -Name "Documents" -ItemType "directory" -Force
cd Documents
New-Item -Path "." -Name "Personal" -ItemType "directory" -Force
New-Item -Path "." -Name "Business" -ItemType "directory" -Force
New-Item -Path ".\Personal" -Name "Family" -ItemType "directory" -Force
New-Item -Path ".\Personal" -Name "Education" -ItemType "directory" -Force
New-Item -Path ".\Personal" -Name "Finance" -ItemType "directory" -Force
New-Item -Path ".\Personal" -Name "Health" -ItemType "directory" -Force
New-Item -Path ".\Business" -Name "Client" -ItemType "directory" -Force
New-Item -Path ".\Business" -Name "Product" -ItemType "directory" -Force
New-Item -Path ".\Business" -Name "Finance" -ItemType "directory" -Force
Sample output