Skip to content
  • There are no suggestions because the search field is empty.

 How To: Match Folders and File Names in Titan Event Conditions

 How To: Match Folders and File Names in Titan Event Conditions

Applies to: Titan SFTP and Titan MFT server events that use the Directory (folder) and File name conditions, for example a File Upload / Write Successful event.

Event conditions decide which uploads start your event actions (PGP decrypt, move, run a script, send an email, and so on). A pattern that is off by one character, such as a trailing backslash or a * in the wrong place, can make an event fire for every file on the server or for none at all. This article explains exactly what each condition compares against, how wildcards work, and gives tested examples.

Quick answer

To run an event only for files uploaded directly into a folder (not its subfolders), use:

  • Directory condition: *\MFTUsers\partner\IN (no backslash or * at the end)
  • File name condition: *.pgp (or whatever file names you want)
  • Event logic (last page of the event wizard): All conditions are true

1. What each condition is compared with

Condition Compared with Example, for an upload of F:\MFTUsers\partner\IN\claims_837.dat.pgp
Directory The folder the file was uploaded to (its parent folder), without a trailing backslash F:\MFTUsers\partner\IN
File name The full path of the file. A pattern with no \ in it is matched against the file name only (see section 4). F:\MFTUsers\partner\IN\claims_837.dat.pgp

Both are the physical path on the server (for example F:\..., \\fileserver\share\... or /data/... on Linux), not the path the user sees in their SFTP client (such as /IN).

2. Wildcard rules

  • * matches any characters within one folder or file name. It does not cross a \. For example, IN\* matches IN\Archive but not IN\Archive\2026.
  • ** matches any number of folder levels, including none.
  • A pattern that starts with *\ is treated as **\, meaning "anywhere on any drive or share". So *\MFTUsers\partner\IN matches F:\MFTUsers\partner\IN and also E:\Data\MFTUsers\partner\IN.
  • Only * and ** are wildcards. Treat every other character, including ?, as literal text.
  • Matching is not case-sensitive: *.PGP matches file.pgp.
  • \ and / are interchangeable in patterns.
  • If your pattern contains ** anywhere, Titan uses it exactly as written. In that case, also start it with **\ (not *\) when you mean "anywhere". Don't include a drive letter or \\server\share prefix in such a pattern: F:\**\IN never matches anything; use **\IN instead.

3. Directory condition examples

Example folders. Each row shows the folder a file was uploaded into.

  • A: F:\MFTUsers\partner\IN
  • B: F:\MFTUsers\partner\IN\Archive
  • C: F:\MFTUsers\partner\IN\Archive\2026
  • D: F:\MFTUsers\partner\INBOX
  • E: E:\Data\MFTUsers\partner\IN
Directory pattern A
IN
B
IN\Archive
C
IN\Archive\2026
D
INBOX
E
E:\Data\...\IN
Use it for
*\MFTUsers\partner\IN Yes No No No Yes Recommended. Files directly in IN only.
*\MFTUsers\partner\IN\ No Yes Yes No No Don't use. A trailing backslash matches every subfolder of IN at any depth, but never IN itself.
*\MFTUsers\partner\IN\* No Yes No No No Files one level below IN only (common mistake when IN itself is intended).
**\MFTUsers\partner\IN\** No Yes Yes No No Files in any subfolder of IN, at any depth, but not IN itself.
*\MFTUsers\partner\IN
and
**\MFTUsers\partner\IN\**
(two entries in the same condition)
Yes Yes Yes No Yes (IN itself only) IN and all of its subfolders.
F:\MFTUsers\partner\IN Yes No No No No One exact folder on one drive.
MFTUsers\partner\IN Yes No No No No Anchored at the root of the drive or share (no leading *).
*\partner\IN* Yes No No Yes Yes Careful: a * after the name also matches INBOX, IN2, IN_old and so on.
*\IN Yes No No No Yes Any folder named IN for any user. Usually too broad.

4. File name condition examples

Examples for an upload of F:\MFTUsers\partner\IN\claims_837p.dat.pgp:

File name pattern Matches? Notes
*.pgp Yes Any file ending in .pgp, in any folder.
*837*.dat.pgp Yes Name contains 837 and ends in .dat.pgp. A pattern with no \ only looks at the file name, so a folder named 837 doesn't count.
*.dat No The pattern must match the end of the name. This file ends in .pgp.
*.* Yes Matches every file, including names with no dot (for example README). With "Any condition is true" this fires the event for every upload on the server.
* Yes Every file. Same as *.*.
*\partner\IN\*.pgp Yes A pattern containing a folder path is matched against the full path. This one-condition alternative matches .pgp files directly in IN, but not in IN\Archive.
*.filepart (temporary name) Some clients (for example WinSCP) upload as name.filepart and rename it afterwards. See Troubleshooting.

5. Combining patterns and conditions

  • Several patterns in one condition are combined with OR: the condition is met if any pattern matches. If you choose Does not match any, the condition is met only when none of them match.
  • Several conditions in one event are combined using the setting on the last page of the event wizard:
    • All conditions are true (AND): use this when you want a folder and a file name to match. This is what you want in most cases.
    • Any condition is true (OR): the event runs if only one condition matches. For example, a Directory condition of *\partner\IN plus a File name condition of *.* with "Any" runs the event for every file uploaded anywhere on the server.

Watch out: if the event logic is "Any" and the Directory pattern is wrong, the event can still appear to work because the file name condition matches. Once you switch to "All", the wrong Directory pattern stops the event completely. Check the Directory pattern with the table in section 3 before changing the logic.

6. Troubleshooting

  • See what matched: with the server log level set to Debug, every evaluation is logged as a Testing Condition Poco=[...] line followed by conditionMet=True or conditionMet=False. Upload one test file and search the log for those lines to see which pattern failed. The same line also shows result.Result=, which is the condition's final answer. When Does not match any is selected, conditionMet is the value before it is reversed.
  • Temporary upload names: if the client uploads to a temporary name (such as .filepart) and renames it afterwards, a pattern like *.pgp won't match the upload. In WinSCP, turn off Preferences > Transfer > Endurance > Transfer to temporary filename, or add a rename event.
  • Files that are already waiting aren't re-evaluated after you fix a condition. Re-upload them (or move them out and back in over SFTP) to trigger the event.
  • Slow or "batched" processing: event actions with Wait enabled hold up the actions of other events matched by the same upload until they finish or time out. An event that fires more broadly than intended (often "Any" with *.*) can delay unrelated events.

Related articles

Need More Help? We’ve Got You Covered.

If you didn’t find what you were looking for, our support team is here to help. Customers with active maintenance and support can join the help desk and Submit a ticket and one of our experts will follow up shortly.