Hi guys I am wondering how I can save an image efficiently from Mendix folder to another specific folder of OS? One way I am thinking to is just writing a Java code that rewrites an image to that folder byte by byte ( writeImageContent ). Is there another more simple way like changing the location and moving it there, without rewriting the image?
Not sure why you’d want this, but you can probably use Java to find the image on the drive and then move/copy the file.
Your file is situated relative to the deployment folder in \data\files\<first two characters of the GUID>\<next two characters of the GUID>\<GUID> and you will have to rename it on move/copy.
So what I would do is:
Get file/image GUID
Do a substring to get the first two characters, and following two characters
Build the relative path as I mentioned above
Copy the file and rename it to the object’s Name attribute