cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Veingro
Helper IV
Helper IV

Move multiple files to another folder

Hello, 

 

Is there a way to gather all documents from different subfolders existing in the root folder and move to another location? So basically I would like to get rid off subfolders and only move files.

 

I'll appreciate your suggestions.

12 REPLIES 12
v-litu-msft
Community Support
Community Support

Hi @Veingro,

 

You could set a Flow as below:

1. Get files of a specified folder;

2. Filter array to filter out items that not a folder;

3. Apply to each + Move file to move them:

item()?['{Identifier}']

Screenshot 2021-03-11 104817.jpg

 

Screenshot 2021-03-11 104915.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-litu-msft , thanks so much, but it doesn't seem to work?

Veingro_0-1615449444791.png

Is this flow going trough all folders, subfolders that are within one folder to which I am limiting the "Get files properties" or actually stops at this one folder? 

v-litu-msft
Community Support
Community Support

Hi @Veingro,

 

It will go through all folders and files under the folder you set in the Get files action. For example, on my test, it is trying to get all subfolders and files, and files including these located in subfolders.

Could you please Share the Filter array configuration?

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-litu-msft ,

Ok, that's great then. So what might be the reason? Can this be related to the fact that I am trying to move files from an old Sharepoint (classic) and if yes, how to overcome that? Please see below screenshot.

Veingro_1-1615450262556.png

 

 

v-litu-msft
Community Support
Community Support

Hi @Veingro,

 

No, classic SharePoint won't influence it. I guess you could check if the Get files action could return items.

Click run history of Flow-> Click one run-> Check output of Get Files action. 

If the Get files output is empty, it means the folder you set hasn't any folder and files.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Output is empty, but this is not true as in the folder are many subfolders and documents... The same situation occurs on the new sharepoint.

v-litu-msft
Community Support
Community Support

Hi @Veingro,

 

I see "value":[] is empty, so it is no files return. Could you please confirm the SharePoint connection is yours?

Or you could try to create a new Sharepoint connection.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Do you mean Sharepoint connection in the flow? Yes, it is mine. Can there be any other restrictions from the library level?

@v-litu-msft Should I use a "Connect using on-premises data gateway" for a new connection? 

Veingro
Helper IV
Helper IV

@v-litu-msft and strangely enough, I used similar flow yesterday, which worked once and after I wasn't able to move files, although flow was showing correct number of folders in output. 

 

Any suggestions?:) 

Thanks for help.

v-litu-msft
Community Support
Community Support

Hi @Veingro,

 

It's weird, if you are using SharePoint online, it's no need to create a new connection "Connect using on-premises data gateway".

You could use another SharePoint library to test it if works properly.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-litu-msft , 

I've tested it. It doesn't work... No idea why.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (23,721)