Lesson 9/12
Mastering files and folders
Master files and folders in PowerShell: Get-ChildItem, filters, creating and deleting files. A practical tutorial with concrete examples to make handling your data easier.
☰
Contents
18
▾
0:00 Introduction 0:37 Using Get-ChildItem and the dir and ls aliases 1:39 The -Recurse option: searching subfolders 3:06 The -File and -Directory filters 3:42 Filtering by extension (*.bmp) 5:02 Filtering with Where-Object 5:21 Advanced searching with -Include 6:09 Excluding results with -Exclude 6:27 Using $_.LastWriteTime (the last modified date) 7:36 Finding files by size 8:45 Creating files with New-Item 9:54 Creating a file and writing to it in one go 10:26 Creating several folders at once 11:28 1..5 | New-Item for bulk creation 12:26 Deleting a text file with Remove-Item 12:56 Deleting a folder with Remove-Item 14:33 PowerShell vs File Explorer: when to use which 14:45 Copying items with Copy-Item