How to prevent "Include images in subfolders" to write output to subfolders?


#1

How can I change that reading images in subfolders results in the files to be written in subfolders with the same name?
I want all files to be written into one folder, not each one in a subfolder with the name of the folder where an image originated from.

Currently (write images node with File Name set to token File Name):

/origin/foo/xxx.pdf => /destination/foo/xxx-cover.png
/origin/bar/yyy.pdf => /destination/bar/yyy-cover.png

What I want to achieve:

/origin/foo/xxx.pdf => /destination/xxx-cover.png
/origin/bar/yyy.pdf => /destination//yyy-cover.png


#2

There’s not a built in way to do it, but it’s a quick workaround for now (and specifically for 1.1 only).

Add a JavaScript node, and replace the standard script with this one:

function processAsset(document, jsnode, asset) {
    asset.setOutputSubFolder(null)    
    return true;
}

You can get the Retrobatch 1.1 beta from here: http://flyingmeat.com/download/latest/#retrobatch


#3

Thanks a lot. Works perfect.


#4

There should be an option for this or you could include some named script presets. :slight_smile: