NullVoider's picture
Add the Memory Archive corpus: 101 annotated GUI/terminal sessions
60a7ab2 verified
|
Raw
History Blame Contribute Delete
3.42 kB
# Memory: explorer-create-textfile-2
## Overview
Create an empty text file in a folder from a shell. Use this as the terminal route to the
same end state as the file manager's New submenu: one command names the file and its type,
with the extension written out rather than supplied by the menu. The recorded trace opens a
shell, creates an empty `note.txt`, and closes the shell with `exit`.
## Prerequisites
- A desktop environment with a file manager that can create a new empty file of a given
type, or a shell.
- A destination folder that exists and is writable, and that is the active target when the
file is created.
- The file's name decided in advance, including its extension. The file-manager route
creates the file with a default name already in rename mode and keeps the extension for
you; a shell route names the whole thing, extension included.
- No existing file of that name at the destination.
- Clarity that the file is meant to be empty. Both routes produce a zero-length file, and
nothing later in the task puts anything in it.
- An expectation that the file type must be offered by the environment. The file-manager
route creates only the types listed in its New menu, which varies by machine.
## Steps
### Step 1 — Left-click at (268, 1060)
The task is to create an empty text file with a given name, which is a single file-creation command, so the first move is to open a shell. Move the cursor and Left-click the PowerShell icon in the taskbar.
![Step 1](vision/frames/step_0001_20260731_132102_at.webp)
### Step 2 — Type: New-Item -ItemType File $env:USERPROFILE\corpus-seed\note.txt
Type a `New-Item` command with `-ItemType File` to create an empty file. The same command creates folders when told `Directory`, so the item type is what decides which is made — and the file is created with no content, matching the mouse trace, where Explorer's New ▸ Text Document also produces an empty file rather than opening an editor.
![Step 2](vision/frames/step_0002_20260731_132112_at.webp)
### Step 3 — Press: Enter
After typing the command Press Enter to create the file.
![Step 3](vision/frames/step_0003_20260731_132116_at.webp)
### Step 4 — Type: exit
Type `exit` to close the shell.
![Step 4](vision/frames/step_0004_20260731_132122_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_20260731_132126_at.webp)
## Notes & Edge Cases
1. Both routes make a genuinely empty file. Nothing opens for editing and there is nothing to save, so a zero-length file is the finished artifact and not a sign the task stopped halfway.
2. On the shell route the item type is what decides what gets made — the same command creates a folder when told `Directory` and a file when told `File`. Getting that argument wrong produces a folder with a `.txt` name, which looks close enough in a listing to be missed.
3. Creating a file that already exists is an error, not an overwrite, and the flag that forces it through truncates the existing file to nothing. Prefer the failure: check whether the name is taken and ask, rather than silently emptying a file the user still wanted.
4. The prompt returning is not confirmation. A command that failed and a command that succeeded both give the prompt back, so verify the file exists at the path intended before treating the task as done.