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.

enter image description here

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

Popular posts from this blog

minify - Minimizing css files -

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -