Hi All,
I am trying to find all the excels in a directory which contains (doc) in there name and then copy them to other directory.
Could someone please help.
Regards,
Rahul
Hi All,
I am trying to find all the excels in a directory which contains (doc) in there name and then copy them to other directory.
Could someone please help.
Regards,
Rahul
Hi
hope these steps would help you resolve this
–use a assign activity like this
arfiles = Directory.GetFiles(“yourfolderpath”,“*.xlsx”)
where arrfiles is a variable of type array of string
–now use FOR EACH loop and pass the above variable as input
–inside the loop use IF condition like this
item.ToString.Contains(“doc”)
if true it goes to THEN part where use a MOVE FILE activity where mention the input path as item.ToString and destination with the folder you want to move the file
Cheers @rahul_gola
Hi Palaniyappan,
happy new year.
its very great to hear from you. i am checking the activity suggested by you and will get back to you soon.
Regards,
Rahul
hey sorry i have missed to for each LOOP activity
hi Palaniyappan,
This is working amazing, i looking to do some modification as in now there is one folder which contains sub folder i need to look for the (doc) file in each of the sub folders and move them to a directory.
the above suggestion is working like a charm.
could you please help with this as well.
Regards,
Rahul
Sure
To get all the files in. Sub folder then
arrFiles = Directory.GetFiles(yourfolderpath,“*.xlsx”,SearchOption.AllDirectories)
Cheers @rahul_gola
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.