Move all subfolders of a folder to another folder


#1

Hello friends,
I should move all the sunfolders positioned in a folder “D:\Disdette_Outlook\immagini”
image
in another folder.
How can I move all the subfolders in another folder?
let From folder be Y, To folder be Z
move each subfolder in Y to Z
Thank you so much.


camilla :slight_smile:


#2

you can use command prompt if possible.


#3

Have you tried Directory.Move method?


#4

Thank you so much @Bharat.
Can you please me attach an example of application of the activity Directory.move?
Thank you so much,
Camilla​:blush::blush:


#5

Hi

You can refer this link.
how-to-move-a-directory-and-its-files-to-a-new-path

I have created a sample workflowMoveDirectory.zip (2.2 KB)


#6

Thank you so much @Bharat.
I tried to download the your zip but it shows me this message


can you please reattach it?
thank you so much,
Camilla :slight_smile:


#7

I have reattached the file and edited the previous reply or you can download it from here.MoveDirectory.zip (3.3 KB)


#8

image

Refer this one


#9

@Bharat If the destination folder is already present than it shows error


#10

Thank you so much @Bharat.
It works perfectly but in case the destination folder is not already present.
I should make it work in case the destination folder is already present.
Can you please help me?
Thank you so much,
Camilla :slight_smile: