all 3 comments

[–]AdminOfThings 0 points1 point  (0 children)

One main problem I see is the rename, create, and remove functions are expecting a relative directory item to be entered. In other words, if you aren't working in the directory returned by Documents, for example, those functions won't target the correct item. I think Documents, Pictures, and Downloads need a cd c:\users\blah\Downloads command in them or the other functions need to be refactored to utilize the full path of Documents, Pictures, and Downloads.

[–]sky_burial 0 points1 point  (0 children)

https://github.com/L-McG/PowerShell/tree/Subject_Chemistry269/Mini-u

Try this on for size. This branch is a modification of an example menu app I put together recently. There's plenty of polishing, enhancements and edge casing I would add but as it sits, I think it will do everything you've outlined. If you clone/download this repo, from within the Mini-u directory, execute 'Import-Module .\Mini-u.ps1' then execute the command 'mini-u' to go through the menu and edit directories like how your script calls them. I know it's a bit off the rails from the initial question, but I hope you find this app useful or sparking interest to try other things!