So, I have a program that keeps backups from another app and I want to create a backup whenever the files on a specific folder are modified by the other app. This must be done while the program waits the other to close.
I have the following questions:
1. Is it possible without wasting the processor's cycles too much?
2. The code for launching the app goes like this:
Hide();
//Any arguments for the executable (set in this executable's code) are loaded.
//So, for example you pass the arguments --LoadFile <file> via code, this will happen:
// Run "<Program Folder>\Program.exe" --LoadFile <file>
// Set these with _softProcess.Arguments = "argument1 argument2";
_softProcess.StartInfo = _softInfo; //Get the arguments from the variable _softInfo
//Start the program.
_softProcess.Start();
//Wait for the game to close before closing Northbridge.
_softProcess.WaitForExit();
//Calls the Auto-Backup code.
if (Settings.Default.AutoBackupEnabled) AutoBackupCode();
Close();
How do I set it up?
EDIT: I forgot to mention, the app can access and modify multiple files.