While moving files & deleting folder, its getting locked & turns inaccessible

Hi All,
I have a requirement of moving each subfolder one by one in iteration which contain files, to an already existing destination folder.


  1. I am creating a directory(with the same folder name in source path)to the destination Path.
  2. Moving all the files in the subfolder to the created directory in destination Path Folder.
  3. Now i have to delete the directory from the Source Path & I am using delete activity for the same.

In some cases the folder from SourcePath is not getting deleted & when even i am trying to access the folder manually. It gives an error stating the folder is not accessible.

Inputs from the Infra Team:-
The folder is getting locked twice & as a result i am not able to delete the folder.

@vvaidya, @ClaytonM

Please suggest & give your valuable inputs
Thanks in advance

Buddy @ronak_94
you an move or copy the file from one folder to another using move file activity or copy file activity where we need to pass the source folder, within a FOR EACH LOOP by passing the input as a string array named
infile_path = Directory.GetFiles(“Yourfolderpath”,"*.yourfileextension")

and destination folder path
and to delete the folder that gets locked, kindly have a view on this component

Kindly try and let know buddy @ronak_94