cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Move On-Prem File Folders

TMelone
Deputy Chef I
Deputy Chef I

Hello, I am trying to automate our companies file folder archiving process based on criteria and timestamps met in our CRM software. The issue I am running into is that when go to move files from a folder I cannot retain the Sub-Folder structure. My Parnet Folder may have any number of Sub-Folders as users may create sub-folders so I would like to retain the structure when I move the files within this Base Parent folder. Using the Workato Connection "On-Prem Files" I am presented with the options to List and to move all Files using a for each Repeat call however, this will take all files within each sub-folder and move them to one destination leaving the sub-folder structure behind. I do not see the ability to list and then call the SubFolders in order to properly move the files and keep their structure under a new location. Has anyone come up with a solution to move the sub-folder structure along with the files from one location to another? 

Original From Folder: Folder Project01>SubFolder01 (User inputted naming convention)>6Files
Original From Folder: Folder Project01>SubFolder02 (User inputted naming convention)>SubFolder02-01>12Files
Original From Folder: Folder Project01>SubFolder02 (User inputted naming convention)>SubFolder02-02>4Files

Currently If I want to Move all of the files in Folder Project01 this is my Result.

New To Folder: Project01>22Files

If there a way to keep the original Subfolder Structure when moving the files to the New to Folder?


Thomas Melone
Business Analyst
Workato: Automation Pro III
Deltek: Certified Vantagepoint Professional
Deltek: Certified Vision Professional
3 REPLIES 3

meghan-legaspi
Community Manager
Community Manager

Hi @TMelone,

This page will guide you in moving on-prem files with a connector: https://docs.workato.com/connectors/on-prem-files/move-file-action.html 

This assist with moving files within a folder to another folder, however is there anything about moving folders themselves and all content within each sub-folder while retaining the sub-folder structure? I see the documentation states "Only files can be moved". are there any other connections that will move Folders?


Thomas Melone
Business Analyst
Workato: Automation Pro III
Deltek: Certified Vantagepoint Professional
Deltek: Certified Vision Professional

Hi Thomas,

At the moment, our On-Prem Files connector doesn't have the capability yet to move folders, retaining the subfolder structure directly.

If you're not manipulating the files inside the root and subfolders, consider using the On-Prem Command Line Script connector to execute a command to move one folder to another, including the subfolders.

For reference, here's a sample command you need to execute for folder movement:

move /y C:\source_folder D:\destination_folder

On-Prem Command LIine Script Reference: https://docs.workato.com/connectors/on-prem-command-line-scripts.html#on-prem-command-line-scripts