Hi Dear, UiPath community
i have a folder containing Number of files created on different dates
i want filter today created files(which were 2) from this folder and copy those to another folder of my wish.
How to approach this Problem?
Hi Dear, UiPath community
i have a folder containing Number of files created on different dates
i want filter today created files(which were 2) from this folder and copy those to another folder of my wish.
How to approach this Problem?
Follow below:
Assign activity:
Assign activity:
For Each activity:
Assign activity:
If activity:
Copy File activity:
- Source: currentFilePath
- Destination: {Destination folder path}
Hope it will helps!
Regards,
Once you get all the file names in an array, you can use this expression to get the latest file (mostly created today):
latestFile = fileList.OrderByDescending(Function(x) New FileInfo(x).LastWriteTime).FirstOrDefault()
This will get you the first top file. You can move the file to a different folder & execute the same expression again, you will get another file as well.
Hope this helps,
Best Regards.
@Bhagyaraj_Digumarthi1 : Please find code for your reference
FiletFiles.zip (3.5 KB)
, Please let me know in case any issues.
Hi @arjunshenoy i’m not moving the file i’m jst copying the file, so if i use this i will same file again and again.
is their any other way around? i might have number of files created on that same day.
To pick up the second file, you can copy the first obtained file, move it to a temporary folder, copy the second file & then move the first file back to its original location.
Hope this helps,
Best Regards.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.