FileDeleteMultipleStep Execute not doing anything

May 22, 2009 at 11:51 AM

I was using the FileDeleteMultipleStep but the files weren't being deleted ...

stepped through the source code and the call goes to ...

  public void Execute(XmlNode testConfig, Context context)
  { = context.ReadConfigAsString( testConfig, "Directory" );
   this.searchPattern = context.ReadConfigAsString( testConfig, "SearchPattern" );

Am I missing something, this doesn't seem to do any deletion ?

Whereas the other Execute does ...

     public void Execute(Context context)
            DirectoryInfo di = new DirectoryInfo(;
            FileInfo[] files = di.GetFiles(this.searchPattern);

            context.LogInfo("{0} files were found matching the File Mask: \"{1}\" in the directory: \"{2}\"", files.Length, this.searchPattern,;

            // Count all the files in each subdirectory that contain the letter "e."
            foreach (FileInfo file in files)
                context.LogInfo("File: \"{0}\" was successfully deleted.", file.FullName);

May 22, 2009 at 12:16 PM


Yes, this is a bug in the code. We had to fix this manually at my workplace too :-)

Since you have the source, in the first Execute() method which takes the testConfig and context, put in a line to call the overloaded Execute(context) method, at the end , after the member variables are assigned.



May 22, 2009 at 2:21 PM

Gotya ... that works a treat

Thanks again Benjy




May 25, 2009 at 9:28 PM


I'lm a little behind on bug fixes, I'll have a blast through and get a new release out.


thanks for raising this



Jun 5, 2009 at 8:37 PM

This fix is going into v3.1, thanks