There's a programs which output are only in files. The directory structure is that in the main output folder there's a subdirectory which contain incomplete files, which when complete will be moved up (thus in the main output folder). Rarely a file will be left in the subfolder, but there cannot be a file in the main output folder without it being in the subdirectory before. Often a file will be deleted directly in the subdirectory (without it being moved in the main output folder) ; there's no telling how often a particular file name could have been gone through this (ie 15% of the files created have the same file name). Here's an example of the output in chronological order:
As one may see in the last (8th) case, the same situation may arise again, but unlike the previous same case (6th), the file that was--not--left behind (5.abc), have a newer creation date; a reminder that only the subdirectory activity should be analysed. Thus when file information is taken, the creation date of the files should be included compared to see which file is being worked on. In the example above, the only file that should have > 1 entry should be 5.abc, both containing different timestamp and very likely different file size.
I'd like to have a report of the ongoing activity in the subdirectory. It should take little resource and it being done a couple times to a few times a minute is sufficient. How may I have that done?
Thank you kindly
Code:
1 MAIN
SUBDIRECTORY
1.abc
[no file]
2 MAIN
SUBDIRECTORY
2.abc
1.abc
3 MAIN
SUBDIRECTORY
3.abc
2.abc
1.abc
4 MAIN
SUBDIRECTORY
1.abc
3.abc
2.abc
1.abc
5 MAIN
SUBDIRECTORY
4.abc
3.abc
2.abc
1.abc
6 MAIN
SUBDIRECTORY
5.abc
4.abc
3.abc
2.abc
1.abc
7 MAIN
SUBDIRECTORY
3.abc
4.abc
5.abc
3.abc
2.abc
1.abc
8 MAIN
SUBDIRECTORY
5.abc
4.abc
5.abc
3.abc
2.abc
1.abc
I'd like to have a report of the ongoing activity in the subdirectory. It should take little resource and it being done a couple times to a few times a minute is sufficient. How may I have that done?
Thank you kindly
Last edited: