Folder inside a folder-move

I have a folder inside there might be another folder!
How do I get that folder name and inside that folder I want to move all files

1 Like

Kindly try with this expression
arr_folderpath = Directory.GetDirectories(“yourfolderpath“,”.”,SearchOption.AllDirectories)

Now use a for each loop and pass the above array variable a sequence input and change the type argument as string in the property panel

—inside the loop use a Invoke Method activity
Where invoke method activity with the following options:

  1. Target Type as System.IO.Directory
  2. Method Name as Move
  3. Two parameters in property panel with In and String Type for SourceDirectory and DestinationDirectory.

In SourceDirectory mention the input value a simple item and In Destination mention the folder where you want

Hope this would help you
Cheers @KarthikBallary

what is here searchiption

1 Like

Kindly find the updated comment above
For more details on that method

Cheers @KarthikBallary

Kindly let know for any queries or clarification @KarthikBallary

Pls send sample file for this
A folder inside there might be another folder or may not be.
if so it has to go for that sub folder and move files of (".xls, .xlsx, .csv") and delete this sub folder