Every day I run script which downloads couple of files by ftp to lets say C:\files\ directory with names like:
sampl_position_20220714 sampl_position_20220715 sample1_newposition_20220715etc.
All files comes with timestamp and files generating only at workdays (all days except Saturday and Sunday). I need to get file which starts with sampl_position_ and last_workday from today
I know how to get next workday:
(date)+"$(1+$(@(1,2-eq7-(date).dayofweek)))"
But failed to get last workday Spent couple of days trying to find solution but still couldnt get what I want (
Maybe someone could help me with that?