I will try to catch a few idéas of how to check changes in a large number of files.
I dont know what oppurtunities there is to do that.
I will have a folder that contains perheps thousands of files wich will be written to randomly.

How is it possible to in realtime catch wich file that was Just written to ?
And is this possible to do without putting it to a loop that will peek the processor like this example ?

for( int i = 0; i < 5; i++)
{
   i = i - 1;
   GetLastWriteTime(LoopAllFilesHere Infinitely);
}

Anyway, this is OS dependent, but I really can't find any other way except the looping. Another way would be to check all the interrupts at kernel level and see what system calls refer to your folder and would modify it's content, but I don't think this is legal or possible.

I see, I have to check for this. I have found the SystemFileWatcher component and are reading about thishere. Using this it will be possible to check for LastWritten by selecting a directorypath wich will contain a number of files. (*.txt)

This will cath the filenamepath.

private: System::Void fileSystemWatcher1_Changed(System::Object^  sender, System::IO::FileSystemEventArgs^  e) 
{
		 
	 String^ Name1 = e->FullPath;		 
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.