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. Visual Basic
  4. FileSystemWatcher event handler

FileSystemWatcher event handler

Scheduled Pinned Locked Moved Visual Basic
tutorialquestion
2 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.
  • W Offline
    W Offline
    WESHILL
    wrote on last edited by
    #1

    Hi, I would like to use the FileSystemWatcher to run and external command if a file is renamed. For example, if a file is renamed to *.__old the file is copied to a new location. So far I was able to make it work for 1 or 2 simultanious changes but there could be potentially 50 to 100 changes at the same time and it appears that there is a timeout waiting on the first command to execute. Could someone tell me how I could get the FileWatcher to handle multiple commands at the same time? Thanks....

    J 1 Reply Last reply
    0
    • W WESHILL

      Hi, I would like to use the FileSystemWatcher to run and external command if a file is renamed. For example, if a file is renamed to *.__old the file is copied to a new location. So far I was able to make it work for 1 or 2 simultanious changes but there could be potentially 50 to 100 changes at the same time and it appears that there is a timeout waiting on the first command to execute. Could someone tell me how I could get the FileWatcher to handle multiple commands at the same time? Thanks....

      J Offline
      J Offline
      John Kuhn
      wrote on last edited by
      #2

      Perhaps your event handler should start a new process for each change and use an asynchronous callback to let the FileSystemWatcher process know that it's done? What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

      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