Automate File & Folder Organization: Move, Copy, and Restructure with Ease
detail.loadingPreview
Streamline your file management processes with this n8n workflow. Automate the relocation and restructuring of files and folders, ensuring your data is always organized and accessible.
About This Workflow
This n8n workflow is designed to efficiently manage and reorganize your digital assets. It empowers users to automate complex file and folder operations, from moving entire directory structures to precisely placing individual files within a new hierarchy. The workflow intelligently handles subfolders, ensuring that every file is accounted for and placed in its designated new location. Additionally, it offers options for optional deletion of original files after successful transfer and robust error handling for invalid requests. Whether you're starting manually, triggering via webhook, or integrating with other workflows, this solution provides a flexible and powerful way to maintain order in your digital workspace.
Key Features
- Recursive Folder Traversal: Automatically discovers and processes files within all subfolders.
- Dynamic Path Mapping: Intelligently constructs new file paths based on your defined source and destination structures.
- Flexible Triggering: Initiate the workflow via manual execution, webhook, or integration with other n8n workflows.
- Optional Source Deletion: Clean up your original file structure after successful relocation.
- Robust Error Handling: Ensures workflow stability by validating incoming data for path specifications.
How To Use
- Manual Start: To initiate manually, specify the
fromandtofolder paths in theSet folder-paths for from and tonode. Use '/' for subfolders. - Webhook Trigger: Configure the
Webhooknode (ensure it's enabled) and send POST requests with a JSON body containingfromandtoattributes (e.g.,{"from": "Folder/to/move", "to": "New-Folder"}). - Trigger by Other Workflow: In another n8n workflow, use an HTTP Request node to call the webhook URL, passing the
from-pathandto-pathparameters. - Subfolder Handling: The workflow automatically identifies and processes files within subfolders. A corresponding folder structure is created in the destination.
- File Enrichment: The workflow enriches files with their correct destination path within the new structure.
- File Movement: Files are moved to their new locations. Adjust the batch size in the
Loop Overnode for sequential or parallel movement. - Optional Deletion: If desired, enable and configure the
Delete *from*-folderstep to remove original files after successful transfer.
Apps Used
Workflow JSON
{
"id": "d5d62dd1-bac5-477d-8695-12e0d8da516b",
"name": "Automate File & Folder Organization: Move, Copy, and Restructure with Ease",
"nodes": 25,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: d5d62dd1-bac5...
About the Author
Free n8n Workflows Official
System Admin
The official repository for verified enterprise-grade workflows.
Statistics
Related Workflows
Discover more workflows you might like
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.