I edit to clarify the question.
i need to get a file name from a directory where there are so many files. The file name i need contains the current date (yyyymmdd) as a part of name from the file.
i tried with the assign task for the directory but i dont know what method to use with for each task to obtain the correct file name.
perhaps i am focusing a wrong way?
please could you help me with this?
thank you very much.
you could use a directory.getfiles command to pass the folder contents into a string array. from there on, a basic “for each item” would retrieve the full file path (which can be afterwards checked with a string method)
Please find the following attached sample: fileswithnamessample.xaml (6.5 KB)
This will get all filename from particular directory having the currentdate string in file name like file_20170509.xlsx
Directory.EnumerateFiles("D:\Test", "*"+DateTime.Now.Date.ToString("yyyyMMdd")+"*.xlsx", SearchOption.AllDirectories)
i can’t believe it aksh1yadav it works!! thanks for your help and your time!!
as always you make possible the magic!!
Thanks to all
Thanks… pleasure is all mine