Move a path in the whole world
world-rewrite-pathsUpdate all Foundry VTT world references after moving files: replace old path prefixes across scenes, actors, journals, playlists, and more. Run dryRun first to preview changes.
Instructions
After moving files on disk, replace their old path prefix in every document of the world in one step: scenes with tokens, tiles, drawings, notes, sounds, walls, lights and regions; actors with items and effects; items; journals with pages (image pages and images in text); playlists; roll tables; cards; macros. A prefix only matches where a path begins and up to a path boundary, so "Bilder/Token" never touches "Bilder/Tokenringe", and percent-encoded spellings are found too. Runs inside Foundry. Checks the permission of every kind it would change before writing anything. Always run dryRun first and read the report.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | New path prefix, e.g. "Bilder/Portraits". | |
| from | Yes | Old path prefix relative to the data directory, at least 3 characters, e.g. "Bilder/Avatare". | |
| dryRun | No | Only report what would change, without writing (default false). Run this first. | |
| collections | No | Only these collections. Omit for all of them, which is recommended: a partial move leaves broken references. |