How to copy files from one directory to another, whose names contain current date, and so the names change daily.
Example:
File name: Test_14042021.txt
Date today: 14/04/2021 // DDMMYYYYI tried this, but it didn't work:
copy Test_%date:~12,10%%date:~4,2%%date:~7,2%.txt D:\ 1 Answer
Try copy Test_%date:~8,2%%date:~5,2%%date:~0,4%.txt D:\
You can use echo Test_%date:~8,2%%date:~5,2%%date:~0,4%.txt to see what exactly you pass to copy. Fine-tune it until you see your actual file name.