Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Get the information of the file which is get added/modified/deleted anywhere on computer

Get the information of the file which is get added/modified/deleted anywhere on computer

Scheduled Pinned Locked Moved C / C++ / MFC
9 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aamol M
    wrote on last edited by
    #1

    I have used ReadDirectoryChangesW with recursive for sub-folders and watched changes in "c:\". It gave me output for a while and suddenly Microsoft thrown dialog something like "Not responding".... Is their anyway to "Get the information of the file which is get added/modified/deleted anywhere on computer" Thanks In advance..... :)

    AmolM

    D 1 Reply Last reply
    0
    • A Aamol M

      I have used ReadDirectoryChangesW with recursive for sub-folders and watched changes in "c:\". It gave me output for a while and suddenly Microsoft thrown dialog something like "Not responding".... Is their anyway to "Get the information of the file which is get added/modified/deleted anywhere on computer" Thanks In advance..... :)

      AmolM

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Aamol M wrote:

      It gave me output for a while...

      How long?

      Aamol M wrote:

      ...and suddenly Microsoft thrown dialog something like "Not responding"....

      So are you not using ReadDirectoryChangesW() correctly?


      "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

      "Judge not by the eye but by the heart." - Native American Proverb

      A 1 Reply Last reply
      0
      • D David Crow

        Aamol M wrote:

        It gave me output for a while...

        How long?

        Aamol M wrote:

        ...and suddenly Microsoft thrown dialog something like "Not responding"....

        So are you not using ReadDirectoryChangesW() correctly?


        "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

        "Judge not by the eye but by the heart." - Native American Proverb

        A Offline
        A Offline
        Aamol M
        wrote on last edited by
        #3

        I am using "ReadDirectoryChangesW()" and gave "C:\" as path. The file changes were so fast. It gave me output for about 200-250 notifications tentatively.... And after it "Not Responding" - "Send A report To Microsoft Dialog" Now What should I use to "Get the information of the file which is get added/modified/deleted anywhere on computer" Can I have sample code for it or something like that Thanks For Reply... :)

        AmolM

        D 1 Reply Last reply
        0
        • A Aamol M

          I am using "ReadDirectoryChangesW()" and gave "C:\" as path. The file changes were so fast. It gave me output for about 200-250 notifications tentatively.... And after it "Not Responding" - "Send A report To Microsoft Dialog" Now What should I use to "Get the information of the file which is get added/modified/deleted anywhere on computer" Can I have sample code for it or something like that Thanks For Reply... :)

          AmolM

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Aamol M wrote:

          Now What should I use to "Get the information of the file which is get added/modified/deleted anywhere on computer"

          The information is contained in the second argument passed to ReadDirectoryChangesW(). It's in the format of a FILE_NOTIFY_INFORMATION struct.


          "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

          "Judge not by the eye but by the heart." - Native American Proverb

          A 1 Reply Last reply
          0
          • D David Crow

            Aamol M wrote:

            Now What should I use to "Get the information of the file which is get added/modified/deleted anywhere on computer"

            The information is contained in the second argument passed to ReadDirectoryChangesW(). It's in the format of a FILE_NOTIFY_INFORMATION struct.


            "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

            "Judge not by the eye but by the heart." - Native American Proverb

            A Offline
            A Offline
            Aamol M
            wrote on last edited by
            #5

            Yes Sir, I am using "FILE_NOTIFY_INFORMATION" struct but my problem is I want to find the changed file Inforamtion that has changed ANYWHERE on computer. ReadDirectoryChangesW()takes first parameter as path - where to search. But now here I want to search for change ANYWHERE on the computer Thanks In advance...:)

            AmolM

            D 1 Reply Last reply
            0
            • A Aamol M

              Yes Sir, I am using "FILE_NOTIFY_INFORMATION" struct but my problem is I want to find the changed file Inforamtion that has changed ANYWHERE on computer. ReadDirectoryChangesW()takes first parameter as path - where to search. But now here I want to search for change ANYWHERE on the computer Thanks In advance...:)

              AmolM

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              What's wrong with: ReadDirectoryChangesW(hFolder, pBuffer, dwbufLen, TRUE, ...);


              "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

              "Judge not by the eye but by the heart." - Native American Proverb

              A 1 Reply Last reply
              0
              • D David Crow

                What's wrong with: ReadDirectoryChangesW(hFolder, pBuffer, dwbufLen, TRUE, ...);


                "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                "Judge not by the eye but by the heart." - Native American Proverb

                A Offline
                A Offline
                Aamol M
                wrote on last edited by
                #7

                ReadDirectoryChangesW(hFolder, pBuffer, dwbufLen, TRUE, ...); takes first argument as "hFolder" == Name of Folder But I wanted to track whole computer (C:\,D:\E:\ etc). File can be copied, added, deleted etc anywhere on the computer (C:\,D:\E:\ ) I dont know........ :) So here what should be given as a value for "hFolder" then ???? I tried with "C:\" as argument for "hFolder" but it worked for 200-250 files and get crashed OR "NotResponding" messgae from Windows making application to close. :( But here my argument should not be C:\ or D:\ or something like that, coz I want to handle event for all of them.... So what should be done in this case..... Can u again review my question Please ???? There was again Specific requirement that only ".jpg" file should be tracked. i.e. another application can add, delete or change .jpg file anywhere on the computer (C:\, d:\, E:\ etc) I dont know..... This could be greate help if u can explain what should be done or any sort of code for it. Thanks Again for previous replies.... :) and Thanks in Advance toooo :)

                AmolM

                D 1 Reply Last reply
                0
                • A Aamol M

                  ReadDirectoryChangesW(hFolder, pBuffer, dwbufLen, TRUE, ...); takes first argument as "hFolder" == Name of Folder But I wanted to track whole computer (C:\,D:\E:\ etc). File can be copied, added, deleted etc anywhere on the computer (C:\,D:\E:\ ) I dont know........ :) So here what should be given as a value for "hFolder" then ???? I tried with "C:\" as argument for "hFolder" but it worked for 200-250 files and get crashed OR "NotResponding" messgae from Windows making application to close. :( But here my argument should not be C:\ or D:\ or something like that, coz I want to handle event for all of them.... So what should be done in this case..... Can u again review my question Please ???? There was again Specific requirement that only ".jpg" file should be tracked. i.e. another application can add, delete or change .jpg file anywhere on the computer (C:\, d:\, E:\ etc) I dont know..... This could be greate help if u can explain what should be done or any sort of code for it. Thanks Again for previous replies.... :) and Thanks in Advance toooo :)

                  AmolM

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  What value do you have for the fourth argument to ReadDirectoryChangesW()?


                  "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                  "Judge not by the eye but by the heart." - Native American Proverb

                  A 1 Reply Last reply
                  0
                  • D David Crow

                    What value do you have for the fourth argument to ReadDirectoryChangesW()?


                    "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                    "Judge not by the eye but by the heart." - Native American Proverb

                    A Offline
                    A Offline
                    Aamol M
                    wrote on last edited by
                    #9

                    Parameter 4:- bWatchSubtree "true" So it will look up in sub-folders also.

                    AmolM

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups