You can see your notes in Finder or File Explorer, but your desktop AI agent keeps asking where they are. “Read the notes on my desktop” may leave it guessing which file you mean. Give it the exact path, a clear task, and a way to confirm it opened the right file.

Start by copying the location:

Windows 11: Select the file in File Explorer, open its right-click menu, and choose Copy as path. Paste it into a text field with Ctrl+V. Microsoft documents the command and its shortcut in its Windows 11 release notes.

Mac: Select the file in Finder, press Option+Command+C, then paste with Command+V. We verified this shortcut with a file and a folder on macOS 26.4.

Jump to the agent quick start, Windows instructions, Mac instructions, or troubleshooting.

A file path tells an app where a file is stored. Copying it does not move the file or prove that an agent has read it. The following workflow is for files on your computer, using tools such as Claude Code, Codex, or DeepSeek Harness.

Quick start: tell your desktop agent which file to read

  1. Find the .md or .txt file in Finder or File Explorer.
  2. Copy its path using the steps above. Paste it into your agent's prompt on its own line.
  3. Say what to read and what result you want.
  4. Ask it to return the file's title or first non-empty line before the result, so you can check it read the intended file.

Replace this fictional Mac path with the one you copied:

Read this local file:
/Users/alex/Documents/Project Notes/meeting notes.txt

First return its first non-empty line exactly, then summarize the action items
in three bullets. Only read the file; do not modify it.
If you cannot open it, report the path you tried and the error.

On Windows, replace the path line with your copied location, such as C:\Users\alex\Documents\Project Notes\meeting notes.txt. Keep spaces intact. These are instructions to an agent, not a shell command; do not add shell escapes to ordinary path text.

For a file inside the agent's open project, give the project root as well:

Use the website project with this root:
/Users/alex/Projects/website

Read this path relative to that root:
docs/meeting-notes.md

Return the first non-empty line exactly, then list the decisions and open questions.
Only read; do not change any files. If the root differs from your current
project, tell me before proceeding.

Compare the returned line or title with the document you intended. If it differs, correct the path before asking for more work. A plausible summary alone does not establish that the right file was opened.

The exact input used in our Codex CLI test, saved as text and shown in TextEdit. It gives a local path, a task, and a first-line check.Codex CLI 0.153.4 · TextEdit · macOS 26.4 · Simplified Chinese interface · Captured 2026-09-17 · DSHub local test
The actual Codex CLI result, saved as text and shown in TextEdit. The first line exactly matches the synthetic source file.Codex CLI 0.153.4 · TextEdit · macOS 26.4 · Simplified Chinese interface · Captured 2026-09-17 · DSHub local test

Copy a file path on Windows 11

  1. Open File Explorer and find the file you need.
  2. Right-click the file itself, rather than empty space inside its folder.
  3. Choose Copy as path.
  4. Open a plain text editor or the destination text field and press Ctrl+V.

Microsoft documented Ctrl+Shift+C in a Windows 11 Insider release; try it with the file selected, or use the menu command. These instructions rely on official documentation, including that historical record, and were not tested on Windows for this guide. Microsoft's command and shortcut record.

A full file path includes the complete filename, including its extension if it has one. For example:

C:\Users\alex\Documents\Project Notes\meeting notes.txt

The example paths use fictional alex locations; the screenshots show a separate synthetic test file. The names and locations on your computer will differ. Check any surrounding quotes in the pasted text before putting it into another app; the quoting section explains what to keep.

Copy the folder location instead

If you want the folder you are currently viewing, open that folder in File Explorer. Press Alt+D to select the address bar, then Ctrl+C to copy its text. Microsoft lists Alt+D as the address-bar shortcut. Windows keyboard shortcuts.

Use this for a normal filesystem folder. Copying its address does not append the name of a selected file. If you need meeting notes.txt, copy the file's path instead.

Copy a file path on Mac

  1. Open Finder and select the file once.
  2. Press Option+Command+C together.
  3. Click a text field and press Command+V.

For a mouse-based alternative, right-click the file, hold Option, and choose the menu item that copies it as Pathname. Apple documents this Finder method in its guide to file and folder paths.

Use the same shortcut after selecting a folder to copy that folder's path. You do not need to open every parent folder or retype the location.

What we tested

On September 11, 2026, we tested Finder on macOS 26.4, build 25E246, with a Simplified Chinese interface. We copied a synthetic file named report 中文 sample.txt and a folder named Plain Folder, then pasted the results into TextEdit and saved them as plain text.

The shortcut preserved the complete location, spaces, and Chinese characters. The native Copy as Pathname menu action produced the same file path. Our pasted results included literal outer single quotes; an equivalent example using a fictional location is:

'/Users/alex/Documents/Path Test/report 中文 sample.txt'

This was a single-machine functional check, not a speed or compatibility benchmark. We invoked the native menu action through accessibility controls; we did not separately test the visual menu change while physically holding Option. Other versions or destination apps may handle formatting differently.

See the folder hierarchy in Finder

Choose View → Show Path Bar. To copy a folder location from the bar, Control-click the relevant folder and use its pathname-copy command. Choose the folder you actually need: a parent folder is a different location from the selected file. Apple's path-bar instructions.

Finder with the synthetic file selected and its path bar visible. Press Option+Command+C to copy the selected file’s pathname.Finder · macOS 26.4 · Simplified Chinese interface · Captured 2026-09-17 · DSHub local test

File path, folder path, or relative path?

Check what the receiving app is asking for before you paste. These examples refer to different things:

TypeExampleWhat it identifies
Full file path on Mac/Users/alex/Documents/Project Notes/meeting notes.txtOne named file
Folder path on Mac/Users/alex/Documents/Project NotesThe containing folder
Full file path on WindowsC:\Users\alex\Documents\Project Notes\meeting notes.txtOne named file on the C: drive
Project-relative pathdocs/meeting notes.txtA file located from a specified project root

An absolute path includes its starting location, such as / on Mac or a drive root in the Windows example. A relative path needs a base directory. Without that base, docs/meeting notes.txt leaves the recipient guessing which docs folder you mean.

For example, with /Users/alex/Projects/website as the project root, the relative path docs/meeting notes.txt refers to:

/Users/alex/Projects/website/docs/meeting notes.txt

Use an absolute path for a specific local file. Use a project-relative path when the recipient already has the same project and you can state its root.

Spaces and quotes: what should you paste?

Keep spaces and other characters inside the filename exactly as they are. Renaming meeting notes.txt in the pasted text to meetingnotes.txt points to a different name.

The surrounding quotes require more care. They may be useful syntax for a command, but an input field asking for a raw path may not expect them.

  • A plain path field: Follow the app's expected format. If it rejects a quoted path, try removing only the matching outer quotes, leaving the path itself intact.
  • A Mac Terminal command: Spaces need appropriate quoting or escaping. For a folder name without an apostrophe, an illustrative command is cd '/Users/alex/Documents/Path Test'. Apple explains both quotes and backslash escaping in its Terminal path guide.
  • A message or document: Put the path in a code block so readers can distinguish it from surrounding punctuation. State whether it is a file or folder.

Avoid adding another pair of quotes automatically. First inspect what was pasted and what the destination expects. The example command above is Mac shell syntax; a Windows command or a filename containing quote characters needs syntax appropriate to that tool.

Use the path in Claude Code, Codex, or DeepSeek Harness

The app instructions below are short walkthroughs based on official documentation. On September 17, 2026, a separate Codex CLI 0.153.4 read-only test on macOS 26.4 returned the synthetic file's first non-empty line exactly and left the file unchanged. The screenshots show its saved input and result in TextEdit, not a Codex app or Terminal interface. Claude Code, DeepSeek Harness, and the Codex desktop app were not tested.

Claude Code: Start in the intended project directory. Type @ and choose the file suggestion, or reference @docs/meeting-notes.md, then add the reading task from the quick start. Claude documents relative and absolute file references; a directory reference supplies a listing, so select the actual file when you want its contents. Start a local session, reference files.

Codex: Open a task in a local project associated with the folder containing your file. Paste its full path and the reading request. Codex's project documentation explains folder association; its prompting guide recommends specific files, goals, and verification. Local projects, prompting Codex. If you use Codex CLI, its documented @ file-path completion is another option; that is not a claim about the desktop app's exact controls.

DeepSeek Harness: In an already open local Harness session, select the intended project workspace, then send the project-relative prompt above. Its guide describes choosing a workspace before sending requests in the locally running interface. Harness workspace guide. Start with a specific .md or .txt file, and ask for its heading or first non-empty line before the summary.

Whichever tool you use, check the returned text against the original file. Merely repeating the path you provided is not evidence that it read the content.

Which tool should you use to copy the path?

For copying a local location, start with the file manager already open on your computer. Additional software makes sense when it solves another part of your task.

Your situationPractical choiceEvidence and limits
You have found a file and need its locationFinder or File ExplorerFinder file/folder copying was tested above; Windows was checked against documentation
You are already working inside a code projectVS CodeOfficially documents absolute and workspace-relative copying; not tested for this guide
You already use an alternative Mac file managerPath FinderIts release notes document a UNIX-path default; not installed or tested for this guide

In VS Code, use the file's Copy Path action for an absolute path, or Copy Relative Path when you need a path relative to the workspace folder root. That distinction is defined in VS Code's official feature notes. Check that you opened the intended workspace folder before using the relative result. You do not need to install an editor just to copy one Finder path.

Path Finder is an option if you already use it. Its version 26.1.1 notes say the parent Copy Path menu item copies a UNIX path by default. Path Finder release notes. We have not tested its interface, speed, or paid plans; the built-in methods already handle the basic task.

Why can't the agent read the file?

It ends at a folder. You may have copied the address bar or a parent folder. Select the actual file and copy again. Check that the final component is the filename you intended.

The relative path points somewhere else. Ask the agent which project root or working directory it is using. Compare it with the root in your prompt. Use an absolute path to remove that particular ambiguity.

Spaces or quotes changed during pasting. Put the path on its own line. Preserve the real filename, and inspect outer quotes. Do not replace spaces with backslashes in a natural-language prompt just because you saw that syntax in a Terminal example.

The file moved, or you are reading a different copy. Copy its current location again. A copied path does not update itself when the file moves. Check the returned title or first non-empty line against the intended document.

The agent reports an access error. An exact location is not a permission grant. Ask it to report the attempted path and the access error, then check the selected project and the product's access settings. A “do not modify” prompt describes your task; it does not change the tool's permission mode.

The answer is generic and never confirms the file. Ask it to read the named file first and return the requested identifying line. Resolve a missing file or access error before relying on the summary.

Use the file-reading quick start