Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get the qvd path?

Hi ,

            I have a requirement like this:

i have qvd's path like:         1) c://project/data/qvd/sample1.qvd,

                                           2)  c://project/data1/data/qvd/sample2.qvd

                                            3)  c://project/data/qvd/sample3.qvd

i want to o/p like this :  1)c://project/data/qvd/

                                   2) c://project/data1/data/qvd/

                                    3)c://project/data/qvd

which function i need to use to achive this?

plz help me on this.

regards,

rk

9 Replies
alexandros17
Partner - Champion III
Partner - Champion III

let path_Pallet = '';

for each File in filelist (path_Pallet)
MyTable:
LOAD *, FileName() as fileName, QvdCreateTime(FileName()) as createTime
FROM $(File) (qvd);
next File 

MK_QSL
MVP
MVP

Left('$(File)',Index('$(File)','\',SubStringCount('$(File)','\'))-1) as Total

Replace $(File) with your FullPath

and '\' with '/'

Not applicable
Author

Hi Manish,

                  Thanks for quick reply,

40 paths  are there in excel file.i want create a table box: like pathname,qvd name.plz find the below attachment.

sample data in excel:

                                            1) c://project/data/qvd/sample1.qvd,

                                            2)  c://project/data1/data/qvd/sample2.qvd

                                            3)  c://project/data/qvd/sample3.qvd

i want o/p like this:

table box:

                       pathname                                                            qvdname

                   1)c://project/data/qvd/                                      sample1.qvd

                   2) c://project/data1/data/qvd/                            sample2.qvd

                   3)c://project/data/qvd                                        sample3.qvd

i am getting only singe path ,i am nt able getting those remaing 2 paths.is there any necessary to use for each.?

how to achive this?

regards,

rk

manojkulkarni
Partner - Specialist II
Partner - Specialist II

pathname = left(vFile, index(vFile,'/',SubStringCount(vFile,'/')))

qvdname = right(vFile,len(vFile)- index(vFile,'/',SubStringCount(vFile,'/')))

Not applicable
Author

still i am not getting.plz can u provide script for that.

MK_QSL
MVP
MVP

How you are getting the pathname... It's from an excel file or you are getting pathname dynamically from your script...

Not applicable
Author

hello do this

test:

load *

, filepath()

filename()

from urpath\*.qvd;

load

subfield(filepath(),'/',5) as file_path,

subfield(filepath(),'.qvd',-1) as filename or filename() as filenames

resident test;

drop test ;

try this and let me know

Not applicable
Author

Hi,

Use below functions in script.

subfiled(filename(),'.',1) AS Pathname,

subfiled(filename(),'.',2) AS QvdName

Thanks,

Ashok.

Not applicable
Author

Sorry below one

subfiled(filepath(),'Sample',1) AS Pathname,

subfiled(filepath(),'/',4) AS QvdName