TomDuncan Active Member Licensed User Longtime User Apr 15, 2017 #1 Hi I have a program which generates images every 30 seconds. What I need is a way to find in that folder the latest image. Tom
Hi I have a program which generates images every 30 seconds. What I need is a way to find in that folder the latest image. Tom
R rboeck Well-Known Member Licensed User Longtime User Apr 15, 2017 #2 Look for jFilewatcher! Last edited: Apr 15, 2017 Upvote 0
stevel05 Expert Licensed User Longtime User Apr 15, 2017 #3 If it's your program that is creating the files, the most efficient way would be to store the last filename. Otherwise you could use File.ListFiles to get all the files in the directory, then check the last modified date of each file. Or this library https://www.b4x.com/android/forum/threads/jfilewatcher-watch-system-file-events.56613/ Upvote 0
If it's your program that is creating the files, the most efficient way would be to store the last filename. Otherwise you could use File.ListFiles to get all the files in the directory, then check the last modified date of each file. Or this library https://www.b4x.com/android/forum/threads/jfilewatcher-watch-system-file-events.56613/