#Bulk replace asset references

1 messages · Page 1 of 1 (latest)

copper warren
#

Hi @placid acorn did you get this sorted at all?

#

You can ignore the user data portion (C:\Users\example\AppData\Local\FoundryVTT\Data) and it's just the stuff after that. It you look at the value of something that you've moved (such as a token image, or scene background), that's the sort of value you should put in the find portion

placid acorn
#

It looks like it is working, though not in bulk. Every time I run the macro it replaces the single token used in the file path but not every single one.

copper warren
placid acorn
#

Just the one, why? All of the tokens follow the same naming convention where it’s the characters name followed by token.webp

copper warren
#

If they are all in that format, you might be able to leave the find field blank, and then put Tokens/ into the replace field. That should prefix Tokens/ onto the start of whatever values are there, but it'll do it for every asset, which I doubt you want (be sure to test it without saving changes first).

desert anchor
#

Read the dialog box closely. If you give it a specific file, it's done exactly what you've asked.

It's doing a path replacement starting from the beginning of the field. For example, I keep my tokens inside the world's folder structure. If I were to reorganize them outside the world, I'd do something like worlds/srm206x/characters/ for the first one and say... assets/ for the second one. That would change something like worlds/srm206x/characters/mdpd/paid/00j_vela_daniel_uniform_t.png to assets/mdpd/paid/00j_vela_daniel_uniform_t.png

#

It's not meant to target single files, it's meant to target the path. It's based on the idea that you've moved entire folders of things from one place to another. If one was packing a scene into a module (based on the source of the macro), you'd want to make sure that the file references inside actors and whatnot are pointed to the assets stored inside the module's folder.

#

...Which by the way... is something I need to do myself after my session tonight. I'm tweaking my backup routine and don't need to backup all my image assets every time.