I have to move file one folder to another which contain DEL name in their name
Use for each file in folder and use the filter as DEL and use move file inside it
Second method Use DIrectory.GetFiles("FolderPath"."*DEL*")
which gives you array of file locations which contain del in them…Now use a loop on array and use move file inside it and change type argument to string and use currentitem in the move file activity and provide the destination folder
cheers
Hi,
arr_Path = Directory.GetFiles(str_FolderPath)
For each file in arr_Path:
if file.Contains(“DEL”):
move file to folder
end if
end for each
mark it as a solution if solves your issue.
Use a For Each activity to loop through all the files in a source folder. You can use the Directory.GetFiles method to get an array of file paths from the source folder.
Directory.GetFiles("C:\Source")
Inside the loop, use an If activity to check if the current file name contains del.
Path.GetFileName(item).Contains("del")
If the condition is true, use a Move File activity to move the current file to a destination folder.
Regards
Gokul
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.