I have folders named ABC_MMddyyyy_HHMM. For each day, there will be more than two folders with different time stamps. I want to copy files from this folder and move them to another location. The files in this folder have the same name and extension. For example, suppose I have two folders named ABC_01152024_1625 and ABC_01152024_1634. Each folder has two files, of which I wish to copy one and move it to another location. The file name in both folders is the same, for example, Filename.txt.
Also, when file is copied and move 2 different location, those file should have timestamp.
Loop through the folder either using for each folder activitiy or directory.getdirectories and put a condition like if foldername_loop_varibale contains datetime.now.tostring(“MMddyyyy”), then copy/move the files inside that folder to the destination and put a break. So whenever the first folder is identified bot moves the files and stops there.