# Export a folder's file links for a linked handoff

AC017 is an optional, manual input aid for the [linked Drive handoff job](https://bulldo.gs/jobs/drive-linked-handoff/). It reads names and actual file URLs for up to 100 nontrashed files directly inside one folder in your own Google account, then prints two tab-separated columns: filename and URL, without a header. It reads no file contents, follows no subfolders or shortcut targets, fetches no URLs, changes no files or sharing, sends no messages and installs no triggers. Filenames and links remain private data in your Apps Script execution log; protect that log. This source is MIT licensed.

1. Copy [drive-linked-handoff-input.gs](https://bulldo.gs/jobs/drive-linked-handoff-input.gs) into a new Apps Script project in the Google account that may read the folder. In Project Settings, show the `appsscript.json` manifest and set `oauthScopes` to `["https://www.googleapis.com/auth/drive.readonly"]`. This grant may read Drive files the account can access, even though this code selects one folder and reads only names, URLs and trash status. Inspect the consent screen before manually authorizing.
2. Replace `FOLDER_ID` with the folder ID. For the fictional folder URL `https://drive.google.com/drive/folders/FICTIONAL_FOLDER`, use `FICTIONAL_FOLDER`, without the URL, query parameters or spaces. This is a format example, not an available folder. Access errors require you to check the chosen account and folder; the helper does not change permissions.
3. Select `exportDriveLinkedHandoffRows` and run it manually. It inspects direct files only and skips trashed files. It rejects more than 100 nontrashed direct files, blank names, names or URLs containing tabs, line breaks or control characters, and output longer than 6,000 characters before printing any rows. Choose a smaller folder if a limit is exceeded; a partial export is unusable. No partial rows are logged on failure.
4. Confirm both `DRIVE_HANDOFF_EXPORT_BEGIN rows=N` and `DRIVE_HANDOFF_EXPORT_END rows=N` appear with the same count. Copy **only** the two-column lines between them, without timestamps, severity prefixes, blank lines or markers. Count your copied lines and check the first and last against the source. Missing markers, mismatched counts or incomplete lines make the export unusable. Zero rows means no nontrashed direct files were found in that checked folder.
5. Paste those rows into **File names and links · two tab-separated columns** on the browser job. Prepare **Promised file names** independently from your intended deliverables, one filename per line. The helper exports the folder's current contents; it does not decide which deliverables you promised. Names are sorted literally and retain case. Duplicate names stay visible and the handoff job rejects them, including names that become duplicates after trimming. Resolve missing, unexpected or duplicate names and duplicate file IDs before drafting. Some Drive file types may return URL shapes the browser job does not support; review its error rather than replacing a URL with an invented link.
6. Review every intended file and manually check that the actual recipient can open it before copying the completed draft to your existing document or email editor. An account's ability to list a folder does not establish recipient access. Contents, versions, completeness and permissions remain unchecked. A folder link cannot replace an individual file link.

The browser comparison and its downloadable module process pasted inputs locally; this helper does not transmit rows to bulldo.gs. Keep private links and output out of public support requests. A folder can change during enumeration, so this is a bounded listing rather than an atomic snapshot; check your intended scope before sending. Shortcut URLs are listed as returned by Drive, without checking their target or access. The source has no verified execution against real Google Drive. Fictional checks establish only local behavior, not Google authorization, recipient access, a sent handoff or useful independent use.

## License

MIT License. Copyright (c) 2026 bulldo.gs contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
