Moving Folder with subfolders along with files to another folder

Hi All,
There is a folder1,inside folder1 there are multiple subfolders,along with multiple files with extension inside subfolder,i need to move everything from folder1 to folder2,can anyone help me how can we do this scenario.

thanks

Use
Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory(SourceDirectoryName, DestinationDirectoryName, True)

Copy Directory.xaml (4.9 KB)

Thanks codegias for the help,
is there anyother method to do it,rather than using invoke code

thanks

You can use move activity and provide details over there

Hi @Navya

Refer the below thread having the complete workflow for your query

Mark as solution and like it if this helps you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

Hi Pratil_Wavhal,
Thanks for the solution,
But i have different file extenstions,i need to extract all of them,how can we do it.

thanks

@Navya

If you have different extenstions then by making IF conditions you can proceed with your logic

Like check below

Hope this helps

Thanks

@Navya

Hey,

You can achieve this using a loop, I have a xaml for this, Though it will require little manipulation.

Hi @Navya

I have updated the workflow as per your requirements. Below is the updated workflow for the same.
Navya.zip (18.2 KB)

For any type of Extension we just have to do *.*
image

OR

Even by not giving it is Ok
image

Input :-
These was the files with multiple extension within Main_folder_1 -> Sub_folder_1
image

Output :-
Moved all files with multiple extensions within Main_folder_2 -> Sub_folder_1
image

Mark as solution and like it :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

@Pratik_Wavhal
Thank you for your help,it is working perfect.
but what if the Subfolder names are dynamic,how can we achieve it.

Thanks

Hi @Navya

Below is the updated workflow which will work with any named subfolder.
Updated Navya.zip (19.6 KB)

Mark as solution and like it :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

2 Likes

Hi @Pratik_Wavhal,
Thank you for the solution,it worked for all subfolders.

Thanks

Hi @Navya

Please mark it as solution and like it as it helped you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.