

{"id":43385,"date":"2018-11-29T14:26:31","date_gmt":"2018-11-29T08:56:31","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=43385"},"modified":"2018-11-29T14:26:31","modified_gmt":"2018-11-29T08:56:31","slug":"qlik-sense-file-functions","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/","title":{"rendered":"Qlik Sense File Functions With Syntax and Example"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:1664,&quot;href&quot;:&quot;https:\\\/\\\/www.qlik.com\\\/us&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251005171129\\\/https:\\\/\\\/www.qlik.com\\\/us\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-09 16:13:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-15 06:41:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-18 07:47:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-22 07:37:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-25 08:15:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-28 17:18:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-02 02:25:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-05 06:56:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-08 07:36:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-11 17:29:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-15 12:30:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-18 13:59:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-23 09:05:01&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-26 13:50:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-29 22:53:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-02 04:22:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-05 10:45:50&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-08 14:30:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-12 07:35:33&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-16 06:29:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-19 09:46:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-23 05:42:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-26 09:01:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-01 18:13:27&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-05 13:16:23&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-09 03:26:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-12 14:32:37&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-16 10:20:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 15:36:45&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-23 12:24:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-26 12:52:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-30 18:15:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-03 21:48:23&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-07 09:23:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-10 09:50:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-14 05:08:24&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-20 04:15:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-23 08:29:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-27 08:40:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-30 12:36:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-04 04:07:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-07 07:38:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-11 15:08:33&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-14 20:51:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-18 12:28:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-21 16:30:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-24 21:19:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-28 12:04:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-01 10:51:43&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-01 10:51:43&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<h2><span style=\"font-weight: 400\">1. Objective<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Earlier, we have discussed <a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-ranking-fucntions\/\"><strong>Qlik Sense Ranking Functions<\/strong><\/a>. Today, we will <a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-tutorial\/\"><strong>see Qlik Sense<\/strong><\/a> File Functions. Moreover, we will see the use of file functions in Qlik Sense to manage table files that are loaded in the data load scripts. Thus, these functions are not applicable on any other type of data sources used and return NULL if used.<\/span><\/p>\n<div id=\"attachment_43411\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-File-Functions-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-43411\" class=\"size-full wp-image-43411\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-File-Functions-01.jpg\" alt=\"Qlik Sense File Functions With Syntax and Example\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-File-Functions-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-File-Functions-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-File-Functions-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-File-Functions-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-File-Functions-01-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-File-Functions-01-520x272.jpg 520w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-43411\" class=\"wp-caption-text\">Qlik Sense File Functions With Syntax and Example<\/p><\/div>\n<p>So, let&#8217;s start Qlik Sense File Functions Tutorial.<\/p>\n<h2>2. Qlik Sense File Functions<\/h2>\n<p>Following are the\u00a0Qlik Sense File Functions, let&#8217;s discuss them in detail &#8211;<\/p>\n<p><strong>You must check &#8211;<\/strong> <strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-integer-functions\/\">Qlik Sense Integer Functions<\/a><\/strong><\/p>\n<h3><span style=\"font-weight: 400\">i. Attribute() Function <\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function returns the attribute names also known as the meta tags of a file. The meta tags must be saved as a part of the file itself for the function to read them. Qlik Sense supports a number of file formats such as MP3, WMA, WMV, PNG, and JPG.<\/span><\/p>\n<p><strong>Syntax for Qlik Sense File Functions:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Attribute(filename, attributename)<\/pre>\n<p><span style=\"font-weight: 400\">Where <\/span><span style=\"font-weight: 400\">filename<\/span><span style=\"font-weight: 400\"> is the name of the file whose attributes or meta tag you wish to get. In some cases, you might also need to specify the path of the file, like, <\/span><b>&#8216;lib:\/\/Table Files\/&#8217;<\/b><span style=\"font-weight: 400\">.<\/span><\/p>\n<p><span style=\"font-weight: 400\">attributename<\/span><span style=\"font-weight: 400\"> is the name of the attributes or meta tags which you want this function to return. <\/span><\/p>\n<p><strong>For example,<\/strong><\/p>\n<p><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0Attribute(FileLongName, &#8216;ImageWidth&#8217;) as ImageWidth,<\/span><\/p>\n<p><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0Attribute(FileLongName, &#8216;ImageLength&#8217;) as ImageLength,<\/span><\/p>\n<p><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0Attribute(FileLongName, &#8216;BitsPerSample&#8217;) as BitsPerSample,<\/span><\/p>\n<p><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0Attribute(FileLongName, &#8216;Compression&#8217;) as Compression,<\/span><\/p>\n<h3><span style=\"font-weight: 400\">ii. ConnectString() function<\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function returns a string having the names of the active or currently connected ODBC or OLE DB connections. If no active connection exists, then the function will return an empty string.<\/span><\/p>\n<p><strong>Syntax for Qlik Sense File Functions:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">ConnectString()<\/pre>\n<p><span style=\"font-weight: 400\">For example, if the script is connected to an OBDC connection named <\/span><i><span style=\"font-weight: 400\">Sales<\/span><\/i><span style=\"font-weight: 400\"> then the function will return the same name in a string.<\/span><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-in-function\/\">Have a look at Qlik Sense in Function<\/a><\/strong><\/p>\n<p><span style=\"font-weight: 400\">Load ConnectString() as ODBCConnection<\/span><span style=\"font-weight: 400\"> will return the string <\/span><span style=\"font-weight: 400\">\u2018Sales\u2019<\/span><span style=\"font-weight: 400\"> in the field <\/span><i><span style=\"font-weight: 400\">ODBCConnection<\/span><\/i><span style=\"font-weight: 400\">.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">iii. FileBaseName() Function<\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function returns a string containing the base name of the table file currently being read in the script. The base name is only the name of the file without the rest of the file path details. <\/span><\/p>\n<p><strong>Syntax for Qlik Sense File Functions:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">FileBaseName()<\/pre>\n<p><span style=\"font-weight: 400\">For example, if the file with the path <\/span><i><span style=\"font-weight: 400\">C:\\UserFiles\\Sales.txt<\/span><\/i><span style=\"font-weight: 400\"> is read by the system currently. Then the function <\/span><span style=\"font-weight: 400\">FileBaseName() <\/span><span style=\"font-weight: 400\">will return the string <\/span><span style=\"font-weight: 400\">\u2018Sales\u2019<\/span><span style=\"font-weight: 400\">. <\/span><\/p>\n<h3><span style=\"font-weight: 400\">iv. FileDir() function<\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function returns the path to the directory of the table file currently being read in the script as a string. <\/span><\/p>\n<p><strong>Syntax for Qlik Sense File Functions:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">FileDir()<\/pre>\n<p><span style=\"font-weight: 400\">For example, if a table file has the path <\/span><i><span style=\"font-weight: 400\">C:\\UserFiles\\Sales.txt <\/span><\/i><span style=\"font-weight: 400\">then,<\/span><\/p>\n<p><span style=\"font-weight: 400\">FileDir()<\/span><span style=\"font-weight: 400\"> will return <\/span><span style=\"font-weight: 400\">\u2018C:\\UserFiles\u2019<\/span><span style=\"font-weight: 400\"> as the directory for the file <\/span><i><span style=\"font-weight: 400\">Sales<\/span><\/i><span style=\"font-weight: 400\">. <\/span><\/p>\n<h3><span style=\"font-weight: 400\">v. FileExtension() function <\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function returns the extension of the table file as string. The table file must be one currently being read. <\/span><\/p>\n<p><strong>Syntax for Qlik Sense File Functions:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">FileExtension()<\/pre>\n<p><span style=\"font-weight: 400\">For example, if a table file has the path <\/span><i><span style=\"font-weight: 400\">C:\\UserFiles\\Sales.txt <\/span><\/i><span style=\"font-weight: 400\">then,<\/span><\/p>\n<p><span style=\"font-weight: 400\">FileExtension()<\/span><span style=\"font-weight: 400\"> will return <\/span><span style=\"font-weight: 400\">\u2018txt\u2019<\/span><span style=\"font-weight: 400\"> as the extension of the file <\/span><i><span style=\"font-weight: 400\">Sales<\/span><\/i><span style=\"font-weight: 400\">. <\/span><\/p>\n<h3><span style=\"font-weight: 400\">vi. FileName() function <\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function returns a string containing the file name with it\u2019s extension. \u00a0<\/span><\/p>\n<p><strong>Recommended Reading &#8211; <a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-table-functions\/\">Qlik Sense Table Functions<\/a><\/strong><\/p>\n<p><strong>Syntax for Qlik Sense File Functions:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">FileName()<\/pre>\n<p><span style=\"font-weight: 400\">For example, if a table file has the path <\/span><i><span style=\"font-weight: 400\">C:\\UserFiles\\Sales.txt <\/span><\/i><span style=\"font-weight: 400\">then,<\/span><\/p>\n<p><span style=\"font-weight: 400\">FileName()<\/span><span style=\"font-weight: 400\"> will return <\/span><span style=\"font-weight: 400\">\u2018Sales.txt\u2019<\/span><span style=\"font-weight: 400\"> as the name of the file <\/span><i><span style=\"font-weight: 400\">Sales<\/span><\/i><span style=\"font-weight: 400\">.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">vii. FilePath() Function <\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function returns the entire path to a table file currently being read in the script. The data type is string. <\/span><\/p>\n<p><strong>Syntax for Qlik Sense File Functions:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">FilePath()<\/pre>\n<p><span style=\"font-weight: 400\">For example, if a table file has the path <\/span><i><span style=\"font-weight: 400\">C:\\UserFiles\\Sales.txt <\/span><\/i><span style=\"font-weight: 400\">then,<\/span><\/p>\n<p><span style=\"font-weight: 400\">FilePath()<\/span><span style=\"font-weight: 400\"> will return <\/span><span style=\"font-weight: 400\">\u2018C:\\UserFiles\\Sales.txt\u2019<\/span><span style=\"font-weight: 400\"> as the path of the file.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">viii. FileSize() function <\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function returns the size of the file in bytes, as an integer value. The filename can be specified and if not, the size of the table file currently being loaded is returned. <\/span><\/p>\n<p><strong>Syntax for Qlik Sense File Functions:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">FileSize([filename])<\/pre>\n<p><span style=\"font-weight: 400\">For example, if a table file has the path <\/span><i><span style=\"font-weight: 400\">C:\\UserFiles\\Sales.txt <\/span><\/i><span style=\"font-weight: 400\">then,<\/span><\/p>\n<p><span style=\"font-weight: 400\">FileSize(\u2018C:\\UserFiles\\Sales.txt\u2019)<\/span><span style=\"font-weight: 400\"> will return <\/span><span style=\"font-weight: 400\">65,724<\/span><span style=\"font-weight: 400\"> as the size of the file <\/span><i><span style=\"font-weight: 400\">Sales.txt<\/span><\/i><span style=\"font-weight: 400\"> in bytes. <\/span><\/p>\n<h3><span style=\"font-weight: 400\">ix. FileTime() Function<\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function returns a string containing the timestamp i.e. date and time of the last time a file or table file was modified. You can also specify the filename for which you wish to obtain a timestamp.<\/span><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-logical-functions\/\">We recommend you to read Qlik Sense Logical functions<\/a><\/strong><\/p>\n<p><strong>Syntax for Qlik Sense File Functions:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">FileTime([ filename ])<\/pre>\n<p><span style=\"font-weight: 400\">For example, the file <\/span><span style=\"font-weight: 400\">\u2018Sales.xls\u2019<\/span><span style=\"font-weight: 400\"> was modified at 2018-11-15 1:28:00 then the function <\/span><span style=\"font-weight: 400\">FileTime(\u2018Sales.xls\u2019)<\/span><span style=\"font-weight: 400\"> will return <\/span><span style=\"font-weight: 400\">\u20182018-11-15 1:28:00\u2019<\/span><span style=\"font-weight: 400\"> as the timestamp.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">x. GetFolderPath() function<\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function returns a string having the full path of a Microsoft Windows folder. <\/span><\/p>\n<p><strong>Syntax for Qlik Sense File Functions:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">GetFolderPath(foldername)<\/pre>\n<p><span style=\"font-weight: 400\">For instance, the sample script given below calls for some folder paths. <\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">LOAD\r\nGetFolderPath('Music')\r\nGetFolderPath('Pictures')\r\nGetFolderPath('Windows')\r\nAutoGenerate 1;<\/pre>\n<p><span style=\"font-weight: 400\">This will return the paths for each folder mentioned in the function, <\/span><\/p>\n<p><span style=\"font-weight: 400\">C:\\Users\\smu\\Music <\/span><span style=\"font-weight: 400\">for the folder Music.<\/span><\/p>\n<p><span style=\"font-weight: 400\">C:\\Users\\smu\\Pictures <\/span><span style=\"font-weight: 400\">for the folder Pictures.<\/span><\/p>\n<p><span style=\"font-weight: 400\">C:\\Windows <\/span><span style=\"font-weight: 400\">for the folder Windows.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">xi. QvdCreateTime() function<\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function returns a string having the XML-header time stamp of a QVD file. It only returns the timestamp if there exists a QVD file in the script. Otherwise, it returns NULL. <\/span><\/p>\n<p><strong>Syntax for Qlik Sense File Functions:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">QvdCreateTime(filename)<\/pre>\n<p><span style=\"font-weight: 400\"><strong>For example,<\/strong> <\/span><\/p>\n<p><span style=\"font-weight: 400\">QvdCreateTime(&#8216;Sales.qvd&#8217;)<\/span><span style=\"font-weight: 400\">will return a XML timestamp like<\/span><span style=\"font-weight: 400\"> \u201c2018-02-20 12:29\u201d<\/span><\/p>\n<p><span style=\"font-weight: 400\">QvdCreateTime(&#8216;C:\\MyDir\\Sales.qvd&#8217;)<\/span><\/p>\n<h3><span style=\"font-weight: 400\">xii. QvdFieldName() function<\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function returns the name of the field present in a QVD file. This function takes in the field number and file name of the QVD file and returns the name of the field corresponding to that field number. If no field corresponding to the field number is present, then the function returns NULL.<\/span><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-null-functions\/\">Let&#8217;s revise Qlik Sense Null Functions<\/a><\/strong><\/p>\n<p><strong>Syntax for Qlik Sense File Functions:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">QvdFieldName(filename , fieldno)<\/pre>\n<p><span style=\"font-weight: 400\">Where, <\/span><span style=\"font-weight: 400\">fieldname<\/span><span style=\"font-weight: 400\"> is the name of the QVD file in which we want to look for a field. <\/span><\/p>\n<p><span style=\"font-weight: 400\">fieldno<\/span><span style=\"font-weight: 400\"> is the integer specifying the number of fields, whose name you want to get from this function. <\/span><\/p>\n<p><span style=\"font-weight: 400\"><strong>For instance,<\/strong> <\/span><\/p>\n<p><span style=\"font-weight: 400\">In a QVD file named <\/span><i><span style=\"font-weight: 400\">Sales<\/span><\/i><span style=\"font-weight: 400\">, the third field is <\/span><i><span style=\"font-weight: 400\">ProductName<\/span><\/i><span style=\"font-weight: 400\">, then the function will be used as, <\/span><\/p>\n<p><span style=\"font-weight: 400\">QvdFieldName(\u2018Sales.qvd\u2019,3)<\/span><span style=\"font-weight: 400\"> will return a string <\/span><span style=\"font-weight: 400\">\u2018ProductName\u2019<\/span><span style=\"font-weight: 400\">.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">xiii. QvdNoOfFields() function<\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function returns the total number of fields in a QVD file. <\/span><\/p>\n<p><strong>Syntax for Qlik Sense File Functions:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">QvdNoOfFields(filename)<\/pre>\n<p><span style=\"font-weight: 400\"><strong>For example,<\/strong> <\/span><\/p>\n<p><span style=\"font-weight: 400\">QvdNoOfFields(\u2018Sales.qvd\u2019)<\/span><span style=\"font-weight: 400\"> returns 5 if the file <\/span><i><span style=\"font-weight: 400\">Sales.qvd<\/span><\/i><span style=\"font-weight: 400\"> has five fields in total. <\/span><\/p>\n<h3><span style=\"font-weight: 400\">xiv. QvdNoOfRecords() function<\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function returns the total number of records in a QVD file. <\/span><\/p>\n<p><strong>Syntax for Qlik Sense File Functions:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">QvdNoOfRecords(filename)<\/pre>\n<p><span style=\"font-weight: 400\"><strong>For example,<\/strong> <\/span><\/p>\n<p><span style=\"font-weight: 400\">QvdNoOfRecords(\u2018Sales.qvd\u2019)<\/span><span style=\"font-weight: 400\"> returns 50 if the file <\/span><i><span style=\"font-weight: 400\">Sales.qvd<\/span><\/i><span style=\"font-weight: 400\"> has fifty fields in total. <\/span><\/p>\n<h3><span style=\"font-weight: 400\">xv. QvdTableName() function <\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function returns the name of the table in the QVD file loaded.<\/span><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-financial-functions\/\">Do you know about Qlik Sense Financial Functions<\/a><\/strong><\/p>\n<p><strong>Syntax for Qlik Sense File Functions:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">QvdTableName(filename)<\/pre>\n<p><span style=\"font-weight: 400\">For example, if a QVD file named Sales.qvd contains the table \u2018Year2018\u2019 then the function<\/span> <span style=\"font-weight: 400\">QvdTableName(Sales.qvd)<\/span><span style=\"font-weight: 400\"> will return the string <\/span><span style=\"font-weight: 400\">\u2018Year2018\u2019<\/span><span style=\"font-weight: 400\">.<\/span><\/p>\n<p>So, this was all in Qlik Sense File Functions. Hope you like our explanation.<\/p>\n<h2><span style=\"font-weight: 400\">3. Conclusion <\/span><\/h2>\n<p><span style=\"font-weight: 400\">These were all the important file functions that we use in data load scripts of Qlik Sense to manage and deal with files, especially table files being loaded into Qlik Sense\u2019s memory. Only <\/span><i><span style=\"font-weight: 400\">ConnectString()<\/span><\/i><span style=\"font-weight: 400\"> function is applicable to files other than table files i.e. ODBC and OLE DB files.<\/span><\/p>\n<p>Still, if you are having any confusion in Qlik Sense File Functions, ask in the comment tab.<\/p>\n<p><strong>See also &#8211;\u00a0<\/strong><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/selections-in-qlik-sense\/\">Qlik Sense Visualizations<\/a><\/strong><\/p>\n<p><a href=\"https:\/\/www.qlik.com\/us\"><strong>Reference for Qlik Sense<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Objective Earlier, we have discussed Qlik Sense Ranking Functions. Today, we will see Qlik Sense File Functions. Moreover, we will see the use of file functions in Qlik Sense to manage table files&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":43411,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17408],"tags":[17757,17756],"class_list":["post-43385","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-qlik-sense-tutorials","tag-file-functions-in-qlik-sense","tag-qlik-sense-file-functions"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Qlik Sense File Functions With Syntax and Example - DataFlair<\/title>\n<meta name=\"description\" content=\"Qlik Sense File Functions,attribute function, connectstring function,filedir,fileextension,filename function,filepath function with example\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Qlik Sense File Functions With Syntax and Example - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Qlik Sense File Functions,attribute function, connectstring function,filedir,fileextension,filename function,filepath function with example\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-11-29T08:56:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-File-Functions-01.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Qlik Sense File Functions With Syntax and Example - DataFlair","description":"Qlik Sense File Functions,attribute function, connectstring function,filedir,fileextension,filename function,filepath function with example","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/","og_locale":"en_US","og_type":"article","og_title":"Qlik Sense File Functions With Syntax and Example - DataFlair","og_description":"Qlik Sense File Functions,attribute function, connectstring function,filedir,fileextension,filename function,filepath function with example","og_url":"https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-11-29T08:56:31+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-File-Functions-01.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"Qlik Sense File Functions With Syntax and Example","datePublished":"2018-11-29T08:56:31+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/"},"wordCount":1268,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-File-Functions-01.jpg","keywords":["File Functions in Qlik Sense","Qlik Sense file Functions"],"articleSection":["Qlik Sense Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/","url":"https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/","name":"Qlik Sense File Functions With Syntax and Example - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-File-Functions-01.jpg","datePublished":"2018-11-29T08:56:31+00:00","description":"Qlik Sense File Functions,attribute function, connectstring function,filedir,fileextension,filename function,filepath function with example","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-File-Functions-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-File-Functions-01.jpg","width":1200,"height":628,"caption":"Qlik Sense File Functions With Syntax and Example"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-file-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Qlik Sense Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/qlik-sense-tutorials\/"},{"@type":"ListItem","position":3,"name":"Qlik Sense File Functions With Syntax and Example"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/43385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=43385"}],"version-history":[{"count":2,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/43385\/revisions"}],"predecessor-version":[{"id":43912,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/43385\/revisions\/43912"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/43411"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=43385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=43385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=43385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}