Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 55267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:21:02+00:00 2026-05-10T17:21:02+00:00

In Windows, is there an easy way to tell if a folder has a

  • 0

In Windows, is there an easy way to tell if a folder has a subfile that has changed?

I verified, and the last modified date on the folder does not get updated when a subfile changes.

Is there a registry entry I can set that will modify this behavior?

If it matters, I am using an NTFS volume.

I would ultimately like to have this ability from a C++ program.

Scanning an entire directory recursively will not work for me because the folder is much too large.

Update: I really need a way to do this without a process running while the change occurs. So installing a file system watcher is not optimal for me.

Update2: The archive bit will also not work because it has the same problem as the last modification date. The file’s archive bit will be set, but the folders will not.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:21:03+00:00Added an answer on May 10, 2026 at 5:21 pm

    This article should help. Basically, you create one or more notification object such as:

     HANDLE dwChangeHandles[2];  dwChangeHandles[0] = FindFirstChangeNotification(        lpDir,                          // directory to watch        FALSE,                          // do not watch subtree        FILE_NOTIFY_CHANGE_FILE_NAME);  // watch file name changes      if (dwChangeHandles[0] == INVALID_HANDLE_VALUE)     {      printf('\n ERROR: FindFirstChangeNotification function failed.\n');      ExitProcess(GetLastError());     }  // Watch the subtree for directory creation and deletion.      dwChangeHandles[1] = FindFirstChangeNotification(        lpDrive,                       // directory to watch        TRUE,                          // watch the subtree        FILE_NOTIFY_CHANGE_DIR_NAME);  // watch dir name changes      if (dwChangeHandles[1] == INVALID_HANDLE_VALUE)     {      printf('\n ERROR: FindFirstChangeNotification function failed.\n');      ExitProcess(GetLastError());     } 

    and then you wait for a notification:

      while (TRUE)     {     // Wait for notification.        printf('\nWaiting for notification...\n');        DWORD dwWaitStatus = WaitForMultipleObjects(2, dwChangeHandles,           FALSE, INFINITE);         switch (dwWaitStatus)        {           case WAIT_OBJECT_0:            // A file was created, renamed, or deleted in the directory.          // Restart the notification.               if ( FindNextChangeNotification(dwChangeHandles[0]) == FALSE )              {                printf('\n ERROR: FindNextChangeNotification function failed.\n');                ExitProcess(GetLastError());               }              break;            case WAIT_OBJECT_0 + 1:            // Restart the notification.               if (FindNextChangeNotification(dwChangeHandles[1]) == FALSE )              {                printf('\n ERROR: FindNextChangeNotification function failed.\n');                ExitProcess(GetLastError());               }              break;            case WAIT_TIMEOUT:           // A time-out occurred. This would happen if some value other           // than INFINITE is used in the Wait call and no changes occur.          // In a single-threaded environment, you might not want an          // INFINITE wait.              printf('\nNo changes in the time-out period.\n');             break;           default:              printf('\n ERROR: Unhandled dwWaitStatus.\n');             ExitProcess(GetLastError());             break;       }    } } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Very general: Is there an easy way to tell which line of code last
Can I install Pinax on Windows Environment? Is there a easy way? Which environment
I'm wondering if there's an easy way to tell which input device triggered a
Is there easy way to install SSH in xampp for windows ?
Is there an easy way to integrate with VirtualBox such that I could develop
Is there an easy way to see whether particular file has DOS/MAC/UNIX line endings?
Is there any easy way to get Windows Edition (Home, Professional, etc.)?
Is there an easy way to monitor Postgres db queries in a (Windows XP)
Is there any easy way of converting a windows-1252 string into a Unicode one?
Is there an easy way to set the zoom level for a windows form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.