NullVoider's picture
Add the Memory Archive corpus: 101 annotated GUI/terminal sessions
60a7ab2 verified
|
Raw
History Blame Contribute Delete
3.9 kB
# Memory: explorer-zip-selection-2
## Overview
Compress a folder into a zip archive beside it, from a shell. Use this as the terminal
route to the same end state as the file manager's send-to-compressed action: one command
names the source folder and the archive to write. The recorded trace opens a shell, runs
`Compress-Archive` over the `docs` folder writing `docs.zip` next to it, and closes the
shell with `exit`.
## Prerequisites
- A desktop environment with a file manager that can create archives, or a shell with an
archiving tool.
- A folder or set of files to archive, existing and readable.
- Write access to the location where the archive is written, and enough free space for it.
- A decision about the archive's internal structure before starting: archiving a folder
puts its name at the root of the archive, while archiving the folder's contents puts the
files at the root. Both are reasonable and they produce different archives from the same
source.
- The archive's name and location decided in advance. Tools that name the archive
automatically derive it from the selection, which is not always the intended name.
- No existing archive at that path, or agreement that it may be replaced.
## Steps
### Step 1 — Left-click at (268, 1060)
The task is to compress a folder into a zip archive beside it, which PowerShell does in one command, so the first move is to open a shell. Left-click the PowerShell icon in the taskbar.
![Step 1](vision/frames/step_0001_20260730_055242_at.webp)
### Step 2 — Type: Compress-Archive -Path $env:USERPROFILE\corpus-seed\docs -DestinationPath $env:USERPROFILE\corpus-seed\docs.zip
Type a `Compress-Archive` command to build the zip. It is PowerShell's built-in archiver, so nothing needs installing, and it produces the same kind of archive the Explorer right-click Compress action does. `-Path` names what goes in and `-DestinationPath` names the archive to write, both given in full so the result lands beside the source folder.
![Step 2](vision/frames/step_0002_20260730_055256_at.webp)
### Step 3 — Press: Enter
After typing the command Press Enter to create the archive.
![Step 3](vision/frames/step_0003_20260730_055300_at.webp)
### Step 4 — Type: exit
Type `exit` to close the shell.
![Step 4](vision/frames/step_0004_20260730_055307_at.webp)
### Step 5 — Press: Enter
After typing the `exit` Press Enter to run it and close the window.
![Step 5](vision/frames/step_0005_20260730_055310_at.webp)
## Notes & Edge Cases
- **Archiving the folder and archiving its contents produce different archives.** Naming
the folder puts that folder at the root of the archive; naming everything inside it puts
the files at the root. Both commands succeed, both produce a valid zip, and only one
matches what the file manager's own compress action does. Decide which structure is
wanted before running, and check by listing the archive afterwards.
- **The file manager names the archive for you and the shell does not.** A file-manager
compress derives the name from the selection — which is the folder's name for a single
folder, and the anchor file's name for a multi-file selection, a difference that
surprises people. The shell requires the name, which is more typing and no ambiguity.
- **The destination is refused if it already exists**, unless a flag is added to overwrite.
That refusal is useful; overriding it replaces an existing archive with no way back.
- **The source folder is left untouched.** Compressing does not consume or move anything.
- **Paths are built from an environment variable rather than written literally**, so the
command does not depend on the account name.
- **A large source takes real time and the prompt does not return until it finishes.**
Confirm the archive exists and has a plausible size rather than assuming completion from
the command being accepted.