Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Renaming File Names

I need to remove (or ignore) underscores from image files (jpeg & gif) so they can be matched with one of the fields in QVD (and finally show images inside a straight chart). Code is working fine but the way image files are sent, they have underscores and that does not match filed values in QVD.

1 Solution

Accepted Solutions
MayilVahanan

Hi

[P ID] contians underscore?

if so, '\..\ImgFiles\'&replace([P ID],'_','')&'.jpg'

hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

6 Replies
MayilVahanan

Hi

If you need to remove the underscore in the file name, please use replace() function like this

Replace(Filename,'_','') As FileName

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

Above option doesn't seem to work.

I'm doing:

MainTable:

Load * From \..\Data.qvd;

Img:

Bundle Info LOAD

     [P ID],

     '\..\ImgFiles\'&[P ID]&'.jpg' as PIDImg

Resident MainTable;

I tried:

Replace('\..\ImgFiles\'&[P ID]&'.jpg','_','') as PIDImg

but no success.

MayilVahanan

Hi

[P ID] contians underscore?

if so, '\..\ImgFiles\'&replace([P ID],'_','')&'.jpg'

hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

Hi,

[P ID] does not have underscores.

MayilVahanan

Hi

Can you say where underscore contain? can you please give some example to solve it?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

[P ID] contains spaces, I did the reverse:

Replace([P ID],' ','_')

and it worked.

Thank you.