Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
let path_Pallet = '
MyTable:
LOAD *, FileName() as fileName, QvdCreateTime(FileName()) as createTime
FROM $(File) (qvd);
next File
Left('$(File)',Index('$(File)','\',SubStringCount('$(File)','\'))-1) as Total
Replace $(File) with your FullPath
and '\' with '/'
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
pathname = left(vFile, index(vFile,'/',SubStringCount(vFile,'/')))
qvdname = right(vFile,len(vFile)- index(vFile,'/',SubStringCount(vFile,'/')))
still i am not getting.plz can u provide script for that.
How you are getting the pathname... It's from an excel file or you are getting pathname dynamically from your script...
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
Hi,
Use below functions in script.
subfiled(filename(),'.',1) AS Pathname,
subfiled(filename(),'.',2) AS QvdName
Thanks,
Ashok.
Sorry below one
subfiled(filepath(),'Sample',1) AS Pathname,
subfiled(filepath(),'/',4) AS QvdName