Archives, Checks and Links

Zip many files into one, check that something is there before you act on it, and make a shortcut to a folder.

Updated

Archives

  1. Many Files as One: Compress-Archive and Expand-Archive (Apprentice): Compress-Archive packs a folder or a few files into one zip file you can send or keep, and Expand-Archive unpacks a zip into a folder, replacing nothing that's already there unless you ask it to.

Checks

  1. Is It There? Test-Path (Apprentice): Test-Path answers one question, is this file or folder there, with True or False, and it can also say whether a path is a file or a folder and whether any file matches a wildcard, so you can check before you act.

Links

  1. Shortcuts to Files: Symbolic Links and Junctions (Journeyman): A link is a signpost to a real file or folder that every program follows; a junction links to a folder with no special rights, while a symbolic link can also point at a file but needs administrator rights or Developer Mode on Windows.

Exercise: Pack for the Trip

  1. Exercise: Pack for the Trip (Apprentice): Get a lake trip ready with PowerShell, unpacking a friend's zip, packing the trip's photos into one, checking three things with Test-Path and making a junction, and let a Pester check tell you what's done.