hi - maybe this can be done already using tokens but i have not been able to figure this out.

i need to import lots of jpegs from a directory structure and i would like to prepend the folder name to the file name

so - i have folders that look like this:
2010-09-20/img0001.jpg
2010-09-20/img0002.jpg
2010-09-20/img0003.jpg
2010-09-21/img0001.jpg
2010-09-21/img0002.jpg
2010-09-21/img0003.jpg

and what would be ideal is to bring in the files to nodes that have titles that look like this:
2010-09-20_img0001.jpg
2010-09-20_img0002.jpg
2010-09-20_img0003.jpg
2010-09-21_img0001.jpg
2010-09-21_img0002.jpg
2010-09-21_img0003.jpg

or - similarly, to add the folder name to the body field or taxonomy or something - so i can at least store the folder name in the database somewhere

if this can be done with the module in its' current state that would be ideal - i have everything working great and just need this one detail, and i would rather not have to hack the module.

thanks in advance - great module!

-- brian

Comments

vordude’s picture

Not sure that this can be done right now. Perhaps a form_alter, or a hook_nodeapi presave might be able to tweak node titles the way you want them to be tweaked.

Perhaps there's imagefield token support to choose the directory of the imagefield...but I'm not sure on that one.

vordude’s picture

#710038: Add token support may be able to help. But, I'm not really chomping at the bit to add token support at this time.

vordude’s picture

Status: Active » Closed (won't fix)