in which you keep the path of the folder the user is currently into.
Then you can just compare the strings using a code like:
int result = strcmp(filename,"C:\Program Files");
If this function returns 0(result becomes 0), means you successfully compared the strings and user has entered "C:\Program Files". If function returns a positive or negative value, then the user is not in this directory.
Do you just want to monitor the file system and have the Operating System notify your application when the user enters a specific folder? Or do you wanna test which folder your application was run from?