---
url: /flow/guide/scripting-reference/functions/file/excludetrailingpathdelimiter.md
---

# ExcludeTrailingPathDelimiter

## Declaration

`Function ExcludeTrailingPathDelimiter( const S : string) : string`

### Example

```pascal
procedure OnMapEvent(var Value:Variant);
begin
  Value := ExcludeTrailingPathDelimiter('c:\test\'); //returns 'c:\test'
end;
```

## Description

Returns the file path without a path delimiter on the end. If the file path does not already have a delimiter on the end then nothing will happen and the result will be the same as the input parameter.
