FIND YOUR NEXT FEW LINES
The snippet library.
Small, practical examples. Search by task or narrow things down below.
5 snippets foundClear filters
Build a portable file path
Combine directory and filename using the platform separator.
Join-Path✓ Tested
Create a directory if needed
Ensure a directory exists before writing output.
New-Item✓ Tested
List files by extension
Enumerate regular files and return their names in order.
Get-ChildItem✓ Tested
Read a whole text file
Load text as one string instead of one item per line.
Get-Content✓ Tested
Write UTF-8 text to a file
Save a string without adding an extra newline.
Set-Content✓ Tested