hi friends:
how to choose correct file’s name in each folder as attachments to send email??
there are three folders contain different files which has the same name like"XXX_IT_Department"
when folder1 has “XXX_IT_Department”, but folder2 also has t “YYY_IT_Department”, but folder3 has not “WWW_IT_Deaprtment”. so it cannot send email attachments. the error: it cannot find file??
thanks, I use a scalable file path, but each file title in three folders may not be consistent.
for example,
I have a document title is IT, but there is no IT in one of the folder.
hello @ANNE
try like below…
Directory.GetFiles(“C:\Temp”,“* keyword*”)(0).ToString
in here keyword is common word which is constant in all file names. Like in your case it is “IT_Department”