Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hola a todos, tengo una duda con qlikview, y me gustaria ver si alguien puede ayudarme.
Alguien sabe si hay alguna funcion que indique si existe un determinado archivo en una direccion de nuestro equipo o red? Como funciona?
Un cordial saludo.
The file functions (only available in script expressions) return information about the table file which is currently being read. These functions will return NULL for all data sources except table files (Exception: ConnectString( )).
Click on the functions that you would like to know more about:
Returns the value of the meta tags of different file formats, e.g. MP3, WMA, WMV and JPG files, as text.
Filename is the name of a media file including path, if needed.
Attributename is the name of a meta tag.
If the file filename does not exist, is not a supported file format or does not contain a meta tag named attributename, null will be returned.
A large number of meta tags can be used, e.g. ‘Artist’ or ‘Date Picture Taken’. The supported tags can automatically be generated in the script. The keyboard shortcut for this generation is Ctrl + Q,J,P,G for jpg files (keep the Ctrl key pressed while typing the QJPG combination), Ctrl + Q,M,P,3 for mp3 files and Ctrl + Q,W,M,A for wma files.
Example:
Attribute('File', 'Title') as X,
returns the mp3 tag 'title' in field X in each record.
Returns the active connect string for ODBC or OLE DB connection. Returns an empty string if no connect statement has been executed or after a disconnect statement.
Returns a string containing the name of the table file currently being read, without path or extension.
Example:
Load *, filebasename( ) as X from
C:\UserFiles\abc.txt
Will return 'abc' in field X in each record read.
Returns a string containing the path to the directory of the table file currently being read.
Example:
Load *, filedir( ) as X from
C:\UserFiles\abc.txt
Will return 'C:\UserFiles' in field X in each record read.
Returns a string containing the extension of the table file currently being read.
Example:
Load *, fileextension( ) as X from
C:\UserFiles\abc.txt
Will return 'txt' in field X in each record read.
Returns a string containing the name of the table file currently being read, without path but including the extension.
Example:
Load *, filename( ) as X from
C:\UserFiles\abc.txt
Will return 'abc.txt' in field X in each record read.
Returns a string containing the full path to the table file currently being read.
Example:
Load *, filepath( ) as X from
C:\UserFiles\abc.txt
Will return 'C:\UserFiles\abc.txt' in field X in each record read.
Returns an integer containing the size in bytes of the file filename or, if no filename is specified, of the table file currently being read.
Examples:
filesize( 'xyz.xls' )
Will return the size of the file xyz.xls.
Load *, filesize( ) as X from abc.txt ;
Will return the size of the specified file (abc.txt) as an integer in field X in each record read.
Returns a timestamp for the date and time of the last modification of the file filename. If no filename is specified, the function will refer to the currently read table file.
Examples:
filetime( 'xyz.xls' )
Will return the timestamp of the last modification of the file xyz.xls.
Load *, filetime() as X from abc.txt ;
Will return the date and time of the last modification of the file (abc.txt) as a timestamp in field X in each record read.
Returns the value of the Microsoft Windows SHGetFolderPath function and returns the path for e.g. My Music. Note that the function does not use the spaces seen in Windows Explorer.
Examples:
GetFolderPath('MyMusic')
GetFolderPath('MyPictures')
GetFolderPath('MyVideos')
GetFolderPath('MyReceivedFiles')
GetFolderPath('MyShapes')
GetFolderPath('ProgramFiles')
GetFolderPath('Windows')
Returns the XML-header time stamp from a QVD file if any (otherwise NULL).
The filename is the name of a QVD file, if necessary including path.
Examples:
QvdCreateTime('MyFile.qvd')
QvdCreateTime('C:\MyDir\MyFile.qvd')
Returns the number of records currently in a QVD file.
The filename is the name of a QVD file, if necessary including path.
Examples:
QvdNoOfRecords ('MyFile.qvd')
QvdNoOfRecords ('C:\MyDir\MyFile.qvd')
Returns the number of fields in a QVD file.
The filename is the name of a QVD file, if necessary including path.
Examples:
QvdNoOfFields ('MyFile.qvd')
QvdNoOfFields ('C:\MyDir\MyFile.qvd')
Returns the name of field number fieldno, if it exists in a QVD file (otherwise NULL).
The filename is the name of a QVD file, if necessary including path.
The fieldno is the number of the field (0 based) within the table contained in the QVD file.
Examples:
QvdFieldName ('MyFile.qvd', 3)
QvdFieldName ('C:\MyDir\MyFile.qvd', 5)
Returns the name of the table contained in a QVD file.
The filename is the name of a QVD file, if necessary including path.
Examples:
QvdTableName ('MyFile.qvd')
QvdTableName ('C:\MyDir\MyFile.qvd')