Move file?

I want to move file from all subfolder in folder output2 to folder data old and in subfolder date today as below.

Please guide me about it.

@fairymemay

Set the path as C:\other usecase\output2 and destination path as “c:\data old” + Now.ToString(“dd.MM.yyyy”)

Now use Invoke method and select Target type as System.IO.Directory
Method Name as Move
Parameters give the source path and Destination Path

Hope this may help you

Thanks

2 Likes

@Sirisha_Sri yes, Move completed
But folder output2 —> disappear after move file

image

Please guide me about it.

@fairymemay

Is Output2 is a subfolder of the Output2

I didn’t get what you are pointing to, Move Directory will move entire folder to another folder
You need to copy the folder? OR Move the folder?

If you want to copy use Copy instead of Move in Method Name

Thanks

1 Like

@Srini84 Move subfolder in output2 to “c:\data old” + Now.ToString(“dd.MM.yyyy”)

@fairymemay

Are you created the folder(29.06.2021) already?
If so delete and try, hope this may help you

Thanks

@Srini84 not problem in Destination path.

But I have problem in source path , I want to move all subfolder in output2.

image

Not delete folder output2 (move subfolder in output2 only)

@fairymemay

You can use For Each activity and give as below

so it will get all the directories inside your folder

Inside For each place the invoke method

In the source you can give as item.ToString which holds the directory path

Hope this may help you

Thanks

1 Like

@Srini84 If in folder output2 have 2 subfolder.

image

If run loop for each round 2, It show error as below.
image

1 Like

Hi @fairymemay
Can you share your xaml file here ,

@amalmarella Yes.

Main (3).xaml (6.1 KB)

1 Like

Hi @fairymemay

Thanks for sending files , but i am unable to open it.