Scenario:
I want to copy the particular file to another locaton.
Destination folder path: D:\Correct\email
Source folder path: C:\Revert\email
.
Here in email
folder there will be many subfolders and each subfolder contains exactly two files like abc.csv
and xyz.csv
so I want to copy the file abc.csv
from the latest created folder(ie in the subfolders of email folder) to destination folder and need not to know the name of subfolder.
Thank you in advance.
Best Answer
You can get a sorted list of directories with
You can get the first result into a variable with
You can then copy the files with