Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

File (Field) Paths

29,479 sites Security covered
View on drupal.org

This module automatically sorts and renames uploaded files using entity-based tokens to create clean file paths and filenames. It supports various file upload fields and offers options for cleaning up paths and filenames, including transliteration and integration with Pathauto.

The File (Field) Paths module extends the default functionality of Drupal's core File module, Image module and many other File upload modules, by adding the ability to use entity based tokens in destination paths and file names.

In simple terms, File (Field) Paths allows you to automatically sort and rename your uploaded files using token based replacement patterns to maintain a nice clean filesystem.

 

Features:

  • Configurable file paths now use entity tokens in addition to user tokens.
  • Configurable file names.
  • Support for file based fields, including but not limited to:
    • Drupal core File module
    • Drupal core Image module
    • Video module.
  • File path and filename cleanup options:
    • Remove slashes from tokens.
    • Filter out words and punctuation by taking advantage of the Pathauto module.
    • Convert unicode characters into US-ASCII with the Transliteration module.
  • [D7] Automatically updates unprocessed file paths in any Text fields on the entity.
  • Retroactive updates - rename and/or move previously uploaded files.
  • Active updating - actively rename and/or move previously uploaded files.
  • Automatically create an redirect when moving uploaded files using the Redirect module.

 

Recommended Modules:

 

Usage/Configuration:

Once installed, File (Field) Paths needs to be configured for each file field you wish to use. Settings can be found on the settings form of any supported file based field.

Example:

Administration > Structure > Content types > Article > Manage fields > Image
http://example.com/admin/structure/types/manage/article/fields/field_image

 

Frequently Asked Questions:

  • Aren't tokens already supported in the FileField module?
    Only User tokens are supported in the FileField module.
    Node tokens allow you to use the Node ID, Node Title, Node creation date and much more in your directory/filenames where User tokens are very limited.
  • Why are my files uploaded to 'files/[nid]' instead of 'files/1'?
    When you are creating or updating a node the full values for the Node tokens may not yet be known by Drupal, so the File (Field) Paths module will upload your files to a temporary path based on your filepath pattern ('files/[nid]') and then once you save the node and Drupal is provided with the Node tokens values the file will be moved to the appropriate location.
  • Why is there a warning on the 'Retroactive updates' feature?
    Retroactive updates will go through every single node of the particular content type and move and/or rename the files.
    While there have been no reports of errors caused by the feature, it is quite possible that the moving/renaming of these files could break links. It is strongly advised that you only use this functionality on your developmental servers so that you can make sure not to introduce any linking issues.
  • What does File (Field) Paths offer that other similar modules do not?
    For an unbiased answer, please refer to the 'File Uploading and Managing' comparison chart at: http://groups.drupal.org/node/20291

 

Activity

Total releases
1
First release
Dec 2025
Latest release
7 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
8.x-1.0-rc1 Pre-release Dec 12, 2025