Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: folder Monitoring script  (Read 3568 times)

0 Members and 1 Guest are viewing this topic.

shan08ms

    Topic Starter


    Starter

    • Experience: Beginner
    • OS: Windows 7
    folder Monitoring script
    « on: October 09, 2014, 01:04:45 AM »
    Hi ,

    I am looking for script which will monitor the folder activities,if folder is not updating i will get a alert mail.


    Thanks in Advance.

    Squashman



      Specialist
    • Thanked: 134
    • Experience: Experienced
    • OS: Other
    Re: folder Monitoring script
    « Reply #1 on: October 09, 2014, 06:55:52 AM »
    Can't say I would try to do that in real time with a batch file. 

    We use a program at work called WatchDirectory that does this.  There are other great programs that do this as well.  Just Google search for "Folder Monitor Software".

    stew2652



      Beginner

      Thanked: 2
      • Experience: Familiar
      • OS: Windows 7
      Re: folder Monitoring script
      « Reply #2 on: October 09, 2014, 10:04:01 AM »
      I wrote a batch file to sound a bell on my pc if the specified folder contains a file with zero bytes:

      set bell=' bell symbol here, looks like this except round:  .  '
      if exist "pathname\input_file*.dat" (
      for /F %%A in ("pathname\input_file*.dat") do If %%~zA equ 0 (
      echo %bell%; %bell%; %bell%; %bell%; %bell%;
      echo ---------------------------
      echo file equals zero
      echo ---------------------------
      pause
      )
      )
      exit

      I'm sure it could be modified to check for other conditions in the folder, and incorporate a time interval.
      The batch is executed automatically each time I login because I created a shortcut in the StartUp folder pointing to the location of this batch file.  Once a day is sufficient for me to be alerted.
      « Last Edit: October 09, 2014, 10:23:07 AM by stew2652 »

      patio

      • Moderator


      • Genius
      • Maud' Dib
      • Thanked: 1769
        • Yes
      • Experience: Beginner
      • OS: Windows 7
      Re: folder Monitoring script
      « Reply #3 on: October 09, 2014, 10:06:01 AM »
      Ding Ding Ding...
      " Anyone who goes to a psychiatrist should have his head examined. "

      shan08ms

        Topic Starter


        Starter

        • Experience: Beginner
        • OS: Windows 7
        Re: folder Monitoring script
        « Reply #4 on: October 09, 2014, 10:20:36 PM »
        Hi ,

        Thanks for the reply,in google already ,but i did't get the more information,that's way i posted here.

        my requirement is folder will updated every one min ,if folder is not updating then script will trigger with time stamp.

        foxidrive



          Specialist
        • Thanked: 268
        • Experience: Experienced
        • OS: Windows 8
        Re: folder Monitoring script
        « Reply #5 on: October 10, 2014, 02:00:52 AM »
        my requirement is folder will updated every one min ,if folder is not updating then script will trigger with time stamp.

        It'd help to know what is in the folder.

        Squashman



          Specialist
        • Thanked: 134
        • Experience: Experienced
        • OS: Other
        Re: folder Monitoring script
        « Reply #6 on: October 10, 2014, 06:53:28 AM »
        WatchDirectory can do what you want.  It has an option called Quiet Events.  Basically meaning if something doesn't happen within the folder for a specified amount of time it will execute the task that you have setup for that job.

        shan08ms

          Topic Starter


          Starter

          • Experience: Beginner
          • OS: Windows 7
          Re: folder Monitoring script
          « Reply #7 on: October 16, 2014, 12:04:41 AM »
          we have some restriction for downloading free softwares,that's way i am searching batch script.please post if any onie having idea about monitoring folder (if folder is not updated then it will give some alert)

          foxidrive



            Specialist
          • Thanked: 268
          • Experience: Experienced
          • OS: Windows 8
          Re: folder Monitoring script
          « Reply #8 on: October 16, 2014, 01:01:48 AM »
          Full details will help to give you an answer that works, rather than us trying to guess what the situation is.

          What is inside the folder?  How many files?  Names.ext would be useful.

          What files are going to appear in the folder?  Names.ext would be useful.

          Squashman



            Specialist
          • Thanked: 134
          • Experience: Experienced
          • OS: Other
          Re: folder Monitoring script
          « Reply #9 on: October 16, 2014, 06:41:25 AM »
          we have some restriction for downloading free softwares
          I never suggested any Free Software. I don't think anyone else in the thread did either.

          DaveLembke



            Sage
          • Thanked: 662
          • Certifications: List
          • Computer: Specs
          • Experience: Expert
          • OS: Windows 10
          Re: folder Monitoring script
          « Reply #10 on: October 16, 2014, 08:21:26 AM »
          One way to check on this would be use of File Compare and then based on the output from file compare alert you if it doesnt equal an output of No Differences Encountered. Any other output result showing a change would give you indication that it has been altered. To do this you would need to have the same file saved in a test against folder, and this way you can trigger a scheduled task to run the file compare between the known reference file, and the file that is subject to being changed. There are numerous ways to be alerted. You can even be alerted via e-mail vs just a ding sound etc. But e-mail would need installation on a service to handle e-mail from command prompt. Link below shows FC.

          http://www.computerhope.com/fchlp.htm