From what you said I understand that you have to monitor the size of a folder.
Check two examples:
Monitoring changes in a directoryhttp://www.news2news.com/vfp/?example=117&function=168This code is based on a timer calling
FindFirstChangeNotification API function.
Monitoring changes occurring within a directory (Win2K/XP)http://www.news2news.com/vfp/?example=400This code stays in a constant loop waiting for a change within a directory: any file name, attributes, size etc. depending on
FILE_NOTIFY_CHANGE flags set. Using of
ReadDirectoryChangesW API function is limited in VFP code unless you decide to call this function from FLL.
* * *
Once you have a notification that a file changed within the directory, you may run a procedure calculating the total size of the files.
#DEFINE FILE_NOTIFY_CHANGE_FILE_NAME 1
#DEFINE FILE_NOTIFY_CHANGE_DIR_NAME 2
#DEFINE FILE_NOTIFY_CHANGE_ATTRIBUTES 4
#DEFINE FILE_NOTIFY_CHANGE_SIZE 8
#DEFINE FILE_NOTIFY_CHANGE_LAST_WRITE 16
#DEFINE FILE_NOTIFY_CHANGE_LAST_ACCESS 32
#DEFINE FILE_NOTIFY_CHANGE_CREATION 64
#DEFINE FILE_NOTIFY_CHANGE_SECURITY 128