---
id: post/yzhums-com/66461
type: post
title: "Dynamics 365 Business Central: How to quickly strip not supported chars in File Name via AL"
summary: Saving files from Business Central to external systems requires removing unsupported characters from file names. The post demonstrates using the StripNotsupportChrInFileName method from codeunit 419 to automatically clean file names before export.
tier: community
language: en
tags:
  - file export
  - filename validation
  - unsupported characters
  - al development
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-26T06:42:31.467Z"
  flags: []
generated:
  at: "2026-10-26T05:51:10.938Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: f3d03c6656eba0a0f9c4e5521306371d593a6813208a57a51f54c42570e5be05
evidence:
  - kind: blog
    url: https://yzhums.com/66461/
    title: "Dynamics 365 Business Central: How to quickly strip not supported chars in File Name via AL"
    date: "2025-08-14"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://yzhums.com/66461/
    title: "Dynamics 365 Business Central: How to quickly strip not supported chars in File Name via AL"
    date: "2025-08-14"
    commit: null
    t: null
    quote: When saving files in Windows or other systems, there are some characters that cannot be contained in file names.
  - kind: blog
    url: https://yzhums.com/66461/
    title: "Dynamics 365 Business Central: How to quickly strip not supported chars in File Name via AL"
    date: "2025-08-14"
    commit: null
    t: null
    quote: However, there is no such restriction when entering data in BC.
links:
  learn: []
  objects:
    - object/codeunit/419
    - object/codeunit/9458
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  related:
    - to: post/yzhums-com/69818
      title: "Business Central 2026 release wave 1 (BC28): Storing Document Attachments outside the database (No customization) – See benefits of external storage support for document attachments"
      label: possibly related
      why: both name Codeunit 9458 "File Account Browser Mgt."
      by: code
    - to: post/yzhums-com/64042
      title: "Dynamics 365 Business Central: Convert Word (.docx) To HTML (.html) within BC (No control add-in and APIs)"
      label: possibly related
      why: both name Codeunit 419 "File Management"
      by: code
    - to: post/yzhums-com/63595
      title: "Dynamics 365 Business Central: Convert Word (.docx) To PDF (.pdf) within BC (No control add-in and APIs)"
      label: possibly related
      why: both name Codeunit 419 "File Management"
      by: code
    - to: post/yzhums-com/68624
      title: "Dynamics 365 Business Central: How to get the page number of a PDF or Word file in AL (Display the page count on Attached Documents and Doc. Attachment List Factbox)"
      label: possibly related
      why: both name Codeunit 419 "File Management"
      by: code
    - to: post/demiliani-com/12623
      title: "Dynamics 365 Business Central: previewing PDF files in web client using the new ExtendedDataType = Document."
      label: possibly related
      why: both name Codeunit 419 "File Management"
      by: code
    - to: post/aardvarklabs-blog/2202
      title: Step by Step Guide to Importing Excel Data into Business Central
      label: possibly related
      why: both name Codeunit 419 "File Management"
      by: code
post_id: "66461"
source_id: yzhums-com
source_name: Dynamics 365 Lab - Yun Zhu
url: https://yzhums.com/66461/
published_at: "2025-08-14T00:46:07.000Z"
author: Yun Zhu
full_text: false
words: 245
quotes:
  - text: When saving files in Windows or other systems, there are some characters that cannot be contained in file names.
    why_it_matters: Explains the root cause of the problem developers face when exporting BC data to external systems
  - text: However, there is no such restriction when entering data in BC.
    why_it_matters: Highlights the gap between BC's permissive input and external systems' file naming restrictions
code_objects_mentioned:
  - codeunit File Management
  - codeunit File Account Browser Mgt.
systems:
  - integration
  - development
versions_mentioned: []
preview:
  embeddable: true
  frame_url: null
  image: https://yzhums.com/wp-content/uploads/2025/08/Snipaste_2025-08-14_09-23-26.png
  image_alt: null
  image_w: null
  image_h: null
  site_name: Dynamics 365 Lab
  favicon: https://yzhums.com/wp-content/uploads/2020/08/cropped-logo-3-32x32.png
  probed_at: "2026-10-26T06:16:43.879Z"
---

# Dynamics 365 Business Central: How to quickly strip not supported chars in File Name via AL

[Read the post](https://yzhums.com/66461/) · Dynamics 365 Lab - Yun Zhu (Yun Zhu, MVP) · 2025-08-14 · 245 words · tier community · reviewed (checked by Opus)

> Saving files from Business Central to external systems requires removing unsupported characters from file names. The post demonstrates using the StripNotsupportChrInFileName method from codeunit 419 to automatically clean file names before export.

## Key points

- Windows and other systems restrict certain characters in file names (like # % & * : < > ? / \ | } ~ etc.)
- Business Central allows entering any characters without restriction, creating a mismatch when exporting files
- Codeunit 419 'File Management' provides a built-in StripNotsupportChrInFileName method to sanitize file names
- An alternative method exists in codeunit 9458 'File Account Browser Mgt.' for the same purpose

## Quotes

- "When saving files in Windows or other systems, there are some characters that cannot be contained in file names." (Explains the root cause of the problem developers face when exporting BC data to external systems)
- "However, there is no such restriction when entering data in BC." (Highlights the gap between BC's permissive input and external systems' file naming restrictions)

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- [codeunit 419 "File Management"](../../objects/codeunit/419.md)
- [codeunit 9458 "File Account Browser Mgt."](../../objects/codeunit/9458.md)

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Business Central 2026 release wave 1 (BC28): Storing Document Attachments outside the database (No customization) – See benefits of external storage support for document attachments](../../posts/yzhums-com/69818.md) — possibly related: both name Codeunit 9458 "File Account Browser Mgt."
- [Dynamics 365 Business Central: Convert Word (.docx) To HTML (.html) within BC (No control add-in and APIs)](../../posts/yzhums-com/64042.md) — possibly related: both name Codeunit 419 "File Management"
- [Dynamics 365 Business Central: Convert Word (.docx) To PDF (.pdf) within BC (No control add-in and APIs)](../../posts/yzhums-com/63595.md) — possibly related: both name Codeunit 419 "File Management"
- [Dynamics 365 Business Central: How to get the page number of a PDF or Word file in AL (Display the page count on Attached Documents and Doc. Attachment List Factbox)](../../posts/yzhums-com/68624.md) — possibly related: both name Codeunit 419 "File Management"
- [Dynamics 365 Business Central: previewing PDF files in web client using the new ExtendedDataType = Document.](../../posts/demiliani-com/12623.md) — possibly related: both name Codeunit 419 "File Management"
- [Step by Step Guide to Importing Excel Data into Business Central](../../posts/aardvarklabs-blog/2202.md) — possibly related: both name Codeunit 419 "File Management"

## Context

- Features: StripNotsupportChrInFileName, filename sanitization

Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
