User Profile

Collapse

Profile Sidebar

Collapse
philip Montgome
philip Montgome
Last Activity: Mar 25 '11, 02:50 PM
Joined: Mar 18 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • philip Montgome
    started a topic File System Watcher problem referencing

    File System Watcher problem referencing

    I have this code to create multiple filesystemwatch ers and store them in an array list but I need to be able to reference an individual watcher to disable raising events while I complete another process. Does anyone know how to achieve this?.

    Thanks

    Code:
            protected void CreateWatchers()
            {
                Logtext("Create Watchers");
    
    
                foreach
    ...
    See more | Go to post

  • philip Montgome
    replied to List reference problem
    Did it this way , could not think of a better one.
    Code:
    for (int i = 0 ; i < fw.Count; i++) {
    
                    String FullPath = e.FullPath;
                    String Directory = System.IO.Path.GetDirectoryName(FullPath);
    
                    MXFLOG.WriteEntry("FullPath = "+ FullPath + "  Directory = "+ Directory);
    
                    if (Directory == watchers[i]) {
    ...
    See more | Go to post

    Leave a comment:


  • philip Montgome
    started a topic List reference problem

    List reference problem

    Can someone point me in the right direction here,

    I have 3 lists

    public List<string> watchers = new List<string>();
    public List<string> OutputFolders = new List<string>
    ArrayList fw = new ArrayList();

    The Watchers + Outputfolders directory is set by reading in an INI file. with the fw being an Arraylist of FileSystemWatch ers.

    ...
    See more | Go to post

  • Working now , silly missing backslash in ini was not setting the path correctly. fixed now.
    See more | Go to post

    Leave a comment:


  • Don't see why this is not working. Would it be better if I just initiate the watchers with a default dummy path and then change it so it reads the .INI file and change them?.

    Any articles or pages on multiple filesystemwatch ers would be great, have been looking all over but it seems not many people do this.
    See more | Go to post

    Leave a comment:


  • philip Montgome
    started a topic Why is my FileSystemWatcher not working?.

    Why is my FileSystemWatcher not working?.

    Hi All,
    I have a windows service that used a filesystemwatch er to monitor a directory, all worked fine. I am now trying to scale it to handle a few more watchers, depending on user input in a INI file.

    The code i have the moment will read in the ini settings, and set the paths , it runs but the watchers never report I am trying this code below, but to no avail.

    Any Ideas?. have I initialized them ok ?. ...
    See more | Go to post

  • Thank you so much , complete brain meltdown over here. Yes implemented as a list and it works great.

    cheers.
    See more | Go to post

    Leave a comment:


  • philip Montgome
    started a topic Assigning variables by addition help?

    Assigning variables by addition help?

    HI there, I have a problem and it's probably my thinking/lack of sleep but..

    I am trying to use the FileSystemWatch er to monitor files.
    However I do not know how many the user will need (say 4)
    I read in the user requirements through a .ini file stating watchpath and output directories.

    My problem comes when I want to assign my watch folder variables to a list which will then activate the fileSystemWatch ers...
    See more | Go to post
No activity results to display
Show More
Working...