c# - how to A specific getfile These days -
foreach (string file in directory.getfiles(@"c:\tbank_file\in\adcode", "*.txt")) { messagebox.show(path.getfilename(file)); }
code me show message file in folder. want getfile specific today. file in folder me.
to specific file, example created today (inside foreach loop) can use properties in getcreationtime or getlastwritetime
for more information:
https://msdn.microsoft.com/en-us/library/system.io.file(v=vs.110).aspx
if (file.getcreationtime(file).dayofyear == datetime.now.dayofyear) { // return file }
Comments
Post a Comment