Skip to content

Instantly share code, notes, and snippets.

@pkutaj
Last active November 27, 2021 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkutaj/9d668836f9ad5df19f59fff7baf552b3 to your computer and use it in GitHub Desktop.
Save pkutaj/9d668836f9ad5df19f59fff7baf552b3 to your computer and use it in GitHub Desktop.
powershell command for getting files in subfolders in a table with parent folder in another column
dir *.mp4 -rec -file |
select-object @{
Name="folder";
Expression = {Split-Path (Split-Path $_.Fullname -parent) -leaf}
},name
@pkutaj
Copy link
Author

pkutaj commented Nov 27, 2021

# EXAMPLE OUTPUT
folder                               Name
------                               ----
10. Course Overview                  10. Course Overview.mp4
11. Course Introduction              10. Course Introduction.mp4
12. Getting Docker                   10. Module Overview.mp4
12. Getting Docker                   11. Docker Desktop.mp4
12. Getting Docker                   12. Play with Docker.mp4
13. Deploying a Containerized App    10. Module Overview.mp4
13. Deploying a Containerized App    11. Warp Speed Run-through.mp4
13. Deploying a Containerized App    12. Containerizing an App.mp4
13. Deploying a Containerized App    13. Hosting on a Registry.mp4
13. Deploying a Containerized App    14. Running a Containerized App.mp4
13. Deploying a Containerized App    15. Managing a Containerized App.mp4
13. Deploying a Containerized App    16. Recap.mp4
14. Microservices and the Real World 10. Module Overview.mp4
14. Microservices and the Real World 11. Cloud-native Microservices.mp4
14. Microservices and the Real World 12. Multi-container Apps with Docker Compose.mp4
14. Microservices and the Real World 13. Taking Things to the Next Level with Docker Swarm.mp4
14. Microservices and the Real World 14. Microservices and Docker Services.mp4
14. Microservices and the Real World 15. Multi-container Apps with Docker Stacks.mp4
15. What's Next-                     10. What's Next-.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment