Distripute some files to different folders

Hi Team,
I am creating a BOT to copy specific files (Photos) from some folders to the same folders in different places and I have a rule for it to copy only the new photos (from one hour ago) and paste them into a new folder so,

any idea about how to send these new photos to the same folder in the other place in one sequence.

as I will be having new folders so I can’t create sequences for each folder to be able to work on the whole folder every time.

@omar_ismail

Assign values to your source folder and target folder:
image

Use a For Each Folder in Folder loop and Move Folder activity inside with the properties like so:

Hope this helps!

Hi,

are you not able to loop using For each File in Folder and For each Folder in Folder and do actions inside it.

Thanks.

System.IO.Directory.GetFiles(“yourFilePath”,“*.jpg”).Where(Function(f) System.IO.File.GetLastWriteTime(f) > Now.AddHours(-1)).ToArray()

this will give you output of latest(last one hour ) files .

after use for each activity with copy file activity inside .

@omar_ismail
Hi Asalam o Alaikum.
Try this one:

Second Option:
You can use

Directory.GetFiles("FolderPath")

Now apply a for each loop, because the above statement would return an array of filename, use below code for LastWriteTime

Directory.GetLastWriteTime(yourFilePath)

Have an if condition if the lastwritetime is less than

DateTime.Now.AddMinutes(30)

then use MOve file activity

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.