# FileName Property
> Version: _Available or changed with runtime version 1.0._
Sets the name of the external file to read data from or write data to an XmlPort.
## Applies to
 Xml Port
## Syntax
```al
FileName = 'File.txt';
```
## Remarks
The FileName property must be set to a valid file name or a run-time error occurs.
This property can be set dynamically by using the ../methods-auto/xmlport/xmlportinstance-filename-method. Using this method together with the Import method, you can create XMLports that are dynamic. This means that they can determine whether data is input or output at run time, and the name of the external file to read from or write to can also be set at run time.
If FileName is blank, then a default request options page tab will be created, where this property can be set at run time. If no name is specified or the devenv-userequestpage-property is set to false, then a run-time error occurs.
> NOTE
> In the Business Central Web client, because web browser restrictions, the file name cannot be set. Users will have to manually select the file when the XMLport is run.
## Related information
../methods-auto/xmlport/xmlportinstance-import-method
../methods-auto/xmlport/xmlportinstance-filename-method
devenv-userequestpage-property

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-filename-property, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/properties/devenv-filename-property/
