Automated Recursive Folder & File Mover
detail.loadingPreview
Effortlessly move entire folder structures, including all subfolders and files, from one location to another. This workflow ensures destination folders are created as needed and paths are correctly mapped, streamlining your file organization and migration tasks.
About This Workflow
This robust n8n workflow automates the complex process of moving files and subfolders recursively, preserving your directory structure. It intelligently identifies all items within a specified source path, creates corresponding destination folders, and meticulously transfers files with correct path enrichment. Whether you need to reorganize existing storage, migrate data, or automate cleanup, this solution offers flexible triggering options—manual execution, webhook, or integration with other workflows. An optional step allows for the secure deletion of the source folder post-transfer, providing a complete and hands-free file management experience.
Key Features
- Recursive File & Folder Movement: Automatically discovers and moves all files and subfolders, no matter how deeply nested.
- Preserves Folder Structure: Intelligently creates destination folders and maps paths to maintain the original hierarchy.
- Flexible Triggering: Initiate transfers manually, via a webhook, or seamlessly integrate with other n8n workflows.
- Intelligent Path Enrichment: Automatically adjusts file paths to fit the new destination structure.
- Optional Source Cleanup: Safely delete the original 'from' folder after a successful move, if desired.
How To Use
- Define Paths: Locate the "Set folder-paths for from and to" node. Configure the
fromparameter with the exact path of the source folder you wish to move, and thetoparameter with the desired destination path. - Select Trigger Method:
- Manual: Use the "When clicking "Execute Workflow"" trigger to run the workflow on demand. Ensure other triggers are disabled.
- Webhook: Activate the "Webhook" node. Send a POST request to its URL with a JSON body containing
"from": "your/source/path"and"to": "your/destination/path". - From Another Workflow: Initiate this workflow from another n8n workflow, ensuring you pass the
fromandtopaths as parameters.
- Adjust Batch Size (Optional): If optimizing for performance, locate the "Loop Over" node and adjust its batch size. A higher batch size can move more files simultaneously, while a batch size of 1 ensures sequential processing.
- Configure Source Folder Deletion (Optional): If you wish to delete the original 'from' folder after a successful move, ensure the "Delete (optional)" node is enabled. Otherwise, disable it to retain the source folder.
Apps Used
Workflow JSON
{
"id": "9f320263-1878-445c-8cba-1055a0f0de4a",
"name": "Automated Recursive Folder & File Mover",
"nodes": 18,
"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: 9f320263-1878...
About the Author
SaaS_Connector
Integration Guru
Connecting CRM, Notion, and Slack to automate your life.
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.