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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Change name of the file

HI all,

In my current application, i'm moving the images from one directory to another directory, till here works fine.

Now, the image names should be renamed after transfered from source to destination directory.

If the Image contains total 30 characters in source folder , after transfered to destination it should be only first 15 characters.

Ex:

SourceName                                                                       DestinationName

FirstImage111222333444.jpeg                                      FirstImage11122.jpeg

SecondImage000123456789.jpeg                                SecondImage0001.jpeg

How can i work on this, Any suggestion from you all.

Thanks in advance.



Regards

Venkat

5 Replies
Miguel_Angel_Baeyens

Hi Venkat,

Since you know the length in source and destination, and that the extension ".jpeg" is needed in the destination name as well, you can use the following:

Left(SubField(SourceName, '.', 1), 15) & '.jpeg' AS DestinationName

Hope that helps.

Miguel

Not applicable
Author

Hi Miguel,

where can i place your code in script.

And one more note, it should rename for all the images which are in the source folder.

Regards

Venkat

Miguel_Angel_Baeyens

Hi Venkat,

Where do you have your image names stored? The above will work when loading a table, for example. The file you uploaded is empty.


Regards.

Miguel

Not applicable
Author

Hi Miguel,

There will be only script in attached file, please view the Edit Script from file.

From Edit Script itself i need to move the images from one location to another location and  also

each image should be renamed from script itself .

Now on this how i can work.

Regards

Venkat

Miguel_Angel_Baeyens

Hi Venkat,

The only script is a EXECUTE with a "move *" line, so it's not anything related to QlikView rather than with your operating system, hence my confussion.

Regards.

Miguel