It is necessary that once in a certain folder something has changed, immediately execute the code.
That is, I change the files in the project, add, delete folders and immediately need to change the updated.txt file by writing the update time to it.

  • operating system? - strangeqargo
  • @strangeqargo windows - Rakzin Roman
  • low-level: under inotify under Linux, there is a port for Windows win-inotify, if you need to develop, normal IDEs see updates themselves. Frameworks: for symphony there is for example, assetic. Inotify Pts handy thing. - strangeqargo 3:05 pm
  • one
    You can watchmedo use the utility (cross-platform, implemented on Python) (allows you to run a command if the specified events ("something has changed in a certain folder") occurred). - jfs

2 answers 2

In the loop, check the size of the files (FileInfo.Length) in the desired directory, when changing, analyze the changed file and write the changes to updated.txt. For the first time, make a cast of what is. Next catch new files or changes.

    Ready C # program that tracks changes
    http://www.codeproject.com/Articles/26528/C-Application-to-Watch-a-File-or-Directory-using-F

    • Are you so popular with your project? - Nick Volynkin
    • @ "Nick Volynkin" - I do not understand, why minusovat answer, if it is on the topic. The source is not at all mine in fact, and no one is promoting anything. Here they suggested toster.ru/q/341170?e=4178854#answer_item_858564 . - Rakzin Roman
    • the cons are not mine, I just posted a comment) - Nick Volynkin
    • I think the disadvantages are for two reasons: this is only a link, which is not enough for an answer, and 2) is slightly similar to self-promotion. I propose either to expand the answer, or leave a link in the comments. - Nick Volynkin