Skip to content

FileNotMatch

Akram El Assas edited this page Feb 19, 2025 · 2 revisions
<?xml version="1.0" encoding="utf-8" ?>
<Tasks>
  <!--
    FileNotMatch is a flowchart task that checks whether a file does not exist in a directory by using a regex pattern.
  -->
  <Task id="$int" name="FileNotMatch" description="$string" enabled="true|false">
    <!-- The path of the directory to check. Example: C:\WexflowTesting\ -->
    <Setting name="dir" value="$string" />
    <!-- The regex pattern. It is case sensitive! Ex: .*\.txt -->
    <Setting name="pattern" value=".*\.txt" />
    <!-- Optional and defaults to false. Indicates whether to check the sub-directories recursively. -->
    <Setting name="recursive" value="false" />

    <!-- Optional. Samba computer name. -->
    <Setting name="smbComputerName" value="$string" />
    <!-- Optional. Samba domain name. -->
    <Setting name="smbDomain" value="$string" />
    <!-- Optional. Samba username. -->
    <Setting name="smbUsername" value="$string" />
    <!-- Optional. Samba password. -->
    <Setting name="smbPassword" value="$string" />
  </Task>
</Tasks>

Here is a sample workflow:

<Workflow xmlns="urn:wexflow-schema" id="186" name="Workflow_FileNotMatch" description="Workflow_FileNotMatch">
  <Settings>
    <Setting name="launchType" value="trigger" />
    <Setting name="enabled" value="true" />
    <Setting name="approval" value="false" />
    <Setting name="enableParallelJobs" value="true" />
    <Setting name="retryCount" value="0" />
    <Setting name="retryTimeout" value="1500" />
  </Settings>
  <LocalVariables />
  <Tasks>
    <Task id="1" name="Wait" description="Wait 3 seconds" enabled="true">
      <Setting name="duration" value="00:00:03" />
    </Task>
    <Task id="2" name="FileNotMatch" description="Check if file-not-match.txt does not exist" enabled="true">
      <Setting name="dir" value="C:\WexflowTesting\" />
      <Setting name="pattern" value="file-not-match.txt" />
    </Task>
  </Tasks>
  <ExecutionGraph>
    <While id="100" parent="-1" while="2">
      <Task id="1">
        <Parent id="-1" />
      </Task>
    </While>
  </ExecutionGraph>
</Workflow>
Clone this wiki locally