textures unpacker

As part of a toolbox I create I want to have a button that put textures together from a scene. The idea is to use external files pack then unpack.

import bpy


I want to choose the directory path. Is it possible? I guess having a path entry then a “save it all!” button would be great

maybe something like this but that won’ t work :confused:

for img in bpy.data.images: 
if img.users: 
bpy.data.images(img).filepath = '//mytextures/'

Yes you can at the start of your code when you pack all:

Search in datas, what textures are packed and his idname.
After unpack all, make a search in that folder of all saved textures to verify and ask with your code where to copy them with a file menu.
And at the end of the copy, erase all first textures in that folder with your code!

Good luck!