# File system access restriction

For security reasons, Qlik Sense in standard mode does not support paths in the data load script or functions and variables that expose the file system.

However, since file system paths were supported in QlikView, it is possible to disable standard mode and use legacy mode in order to reuse QlikView load scripts.

Warning noteDisabling standard mode can create a security risk by exposing the file system.

[Disabling standard mode](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/LoadData/disable-standard-mode.htm)

## Security aspects when connecting to file based ODBC and OLE DB data connections

ODBC and OLE DB data connections using file-based drivers will expose the path to the connected data file in the connection string. The path can be exposed when the connection is edited, in the data selection dialog, or in certain SQL queries. This is the case both in standard mode and legacy mode.

Tip noteIf exposing the path to the data file is a concern, it is recommended to connect to the data file using a folder data connection if it is possible.

## Limitations in standard mode

Several statements, variables and functions cannot be used or have limitations in standard mode. Using unsupported statements in the data load script produces an error when the load script runs. Error messages can be found in the script log file. Using unsupported variables and functions does not produce error messages or log file entries. Instead, the function returns NULL.

There is no indication that a variable, statement or function is unsupported when you are editing the data load script.

### System variables

System variables

| Variable | Standard mode | Legacy mode | Definition |
| --- | --- | --- | --- |
| Floppy | Not supported | Supported | Returns the drive letter of the first floppy drive found, normally a:. |
| CD | Not supported | Supported | Returns the drive letter of the first CD-ROM drive found. If no CD-ROM<br>is found, then c:<br>is returned. |
| QvPath | Not supported | Supported | Returns the browse string to the Qlik Sense executable. |
| QvRoot | Not supported | Supported | Returns the root directory of the Qlik Sense executable. |
| QvWorkPath | Not supported | Supported | Returns the browse string to the current Qlik Sense app. |
| QvWorkRoot | Not supported | Supported | Returns the root directory of the current Qlik Sense app. |
| WinPath | Not supported | Supported | Returns the browse string to Windows. |
| WinRoot | Not supported | Supported | Returns the root directory of Windows. |
| $(include=...) | Supported input:<br>Path using library connection | Supported input:<br>Path using library connection or file system | The Include/Must\_Include variable specifies<br>a file that contains text that should be included in the script and evaluated as script code. It is not used to add data. You can store parts of your script code in a separate text file and reuse it in several apps. This is a user-defined variable. |

### Regular script statements

Regular script statements

| Statement | Standard mode | Legacy mode | Definition |
| --- | --- | --- | --- |
| Binary<br><br>[Binary](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/Binary.htm) | Supported input:<br>Path using library connection | Supported input:<br>Path using library connection or file system | The binary statement is used for loading data from another app. |
| Connect<br><br>[Connect](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/CONNECT.htm) | Supported input:<br>Path using library connection | Supported input:<br>Path using library connection or file system | The CONNECT<br>statement is used to define Qlik Sense access to a general database through the OLE DB/ODBC<br>interface. For ODBC, the data source first needs to be specified using the ODBC administrator. |
| Directory<br><br>[Directory](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/Directory.htm) | Supported input:<br>Path using library connection | Supported input:<br>Path using library connection or file system | The Directory<br>statement defines which directory to look in for data files in subsequent LOAD statements,<br>until a new Directory statement is made. |
| Execute<br><br>[Execute](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/Execute.htm) | Not supported | Supported input:<br>Path using library connection or file system | The Execute statement is used to run other programs while Qlik Sense is loading data. For example, to make conversions that are necessary. |
| LOAD from ...<br><br>[Load](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/Load.htm) | Supported input:<br>Path using library connection | Supported input:<br>Path using library connection or file system | The LOAD statement loads fields<br>from a file, from data defined in the script, from a previously<br>loaded table, from a web page, from the result of a subsequent SELECT<br>statement or by generating data automatically. |
| Store into ...<br><br>[Store](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/Store.htm) | Supported input:<br>Path using library connection | Supported input:<br>Path using library connection or file system | The Store statement creates a QVD, Parquet, CSV, or TXT file. |

### Script control statements

Script control statements

| Statement | Standard mode | Legacy mode | Definition |
| --- | --- | --- | --- |
| For each...<br><br><br>filelist mask/dirlist mask<br><br>[For each..next](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptControlStatements/For%20Each.htm) | Supported input:<br>Path using library connection<br><br>Returned output:<br>Library connection | Supported input:<br>Path using library connection or file system<br><br>Returned output:<br>Library connection or file system path, depending on input | The filelist mask syntax produces a comma separated list of all files in the current directory matching the filelist mask. The dirlist mask syntax produces a comma separated list of all directories in the current directory matching the directory name mask. |

### File functions

File functions

| Function | Standard mode | Legacy mode | Definition |
| --- | --- | --- | --- |
| Attribute()<br><br>[Attribute - script function](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/FileFunctions/Attribute.htm) | Supported input:<br>Path using library connection | Supported input:<br>Path using library connection or file system | Returns the value of the meta tags of different media files as text. |
| ConnectString()<br><br>[ConnectString - script function](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/FileFunctions/ConnectString.htm) | Returned output: Library connection name | Library connection name or actual connection, depending on input | Returns the active connect string for ODBC or OLE DB connections. |
| FileDir()<br><br>[FileDir - script function](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/FileFunctions/FileDir.htm) | Returned output:<br>Library connection | Returned output:<br>Library connection or file system path, depending on input | The FileDir function returns a string containing the path to the directory of the table file<br>currently being read. |
| FilePath()<br><br>[FilePath - script function](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/FileFunctions/FilePath.htm) | Returned output:<br>Library connection | Returned output:<br>Library connection or file system path, depending on input | The FilePath function returns a string containing the full path to the table file currently<br>being read. |
| FileSize()<br><br>[FileSize - script function](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/FileFunctions/FileSize.htm) | Supported input:<br>Path using library connection | Supported input:<br>Path using library connection or file system | The FileSize function returns an integer containing the size in bytes of the file filename<br>or, if no filename is specified,<br>of the table file currently being read. |
| FileTime()<br><br>[FileTime - script function](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/FileFunctions/FileTime.htm) | Supported input:<br>Path using library connection | Supported input:<br>Path using library connection or file system | The FileTime function returns a timestamp in UTC format of the last modification of a specified file. If a file is not specified, the function returns a timestamp in UTC of the last modification of the currently read table file. |
| GetFolderPath()<br><br>[GetFolderPath - script function](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/FileFunctions/GetFolderPath.htm) | Not supported | Returned output:<br>Absolute path | The GetFolderPath function returns the value of the Microsoft Windows SHGetFolderPath function. This function takes as input the name of a Microsoft Windows folder and returns the full path of the folder. |
| QvdCreateTime()<br><br>[QvdCreateTime - script function](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/FileFunctions/QvdCreateTime.htm) | Supported input:<br>Path using library connection | Supported input:<br>Path using library connection or file system | This script function returns the XML-header timestamp from a QVD file, if any is present, otherwise it returns NULL. In the timestamp, time is provided in UTC. |
| QvdFieldName()<br><br>[QvdFieldName - script function](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/FileFunctions/QvdFieldName.htm) | Supported input:<br>Path using library connection | Supported input:<br>Path using library connection or file system | This script function returns the name of field<br>number fieldno<br>in a QVD file. If the field does not exist NULL is returned. |
| QvdNoOfFields()<br><br>[QvdNoOfFields - script function](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/FileFunctions/QvdNoOfFields.htm) | Supported input:<br>Path using library connection | Supported input:<br>Path using library connection or file system | This script function returns the number of fields<br>in a QVD file. |
| QvdNoOfRecords()<br><br>[QvdNoOfRecords - script function](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/FileFunctions/QvdNoOfRecords.htm) | Supported input:<br>Path using library connection | Supported input:<br>Path using library connection or file system | This script function returns the number of records<br>currently in a QVD file. |
| QvdTableName()<br><br>[QvdTableName - script function](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/FileFunctions/QvdTableName.htm) | Supported input:<br>Path using library connection | Supported input:<br>Path using library connection or file system | This script function returns the name of the<br>table stored in a QVD file. |

### System functions

System functions

| Function | Standard mode | Legacy mode | Definition |
| --- | --- | --- | --- |
| DocumentPath() | Not supported | Returned output:<br>Absolute path | This function returns<br>a string containing the full path to the current Qlik Sense app. |

## Learn more

* [System variables](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemVariables/system-variables.htm)
* [System functions](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)