This topic contains 2 replies, has 2 voices, and was last updated by Ryan McBee 8 years ago.
Passing a variable to a file name
You must be logged in to reply to this topic.
This topic contains 2 replies, has 2 voices, and was last updated by Ryan McBee 8 years ago.
This is a weird scenario so bear with me:
I usually have a file to file interface with a translator built into the filter to manipulate the format. But I’ve run accross a system that needs information from the file’s data saved into the filename. This scenario doesn’t seem to work so I’ve built a File to Translator interface that writes each file out individually. Because of some support / reporting I’ve build around my other method, I’d like to know if that was nessecary. Is there any way I can take a value from the file I’m processing in the filter’s translator and pass it out to Iguana so I can use it in the file’s name in the outbound part of the thread?
Desire State
P.S. It’s worth calling out that I already have this working in a File->Translator scenario. I can get the result I’m looking for, I just want to know if there was an easier way.
M.R. McBee
In general I think this is best practice. The To/From File components date from before the the translator. I usually
pick on them as an example of benefits of minimalism:
http://wiki.interfaceware.com/210.html
Using the io.open etc. file functions in Lua is quite easy and gives you so much more power than the built in To/From File components in Iguana.
You must be logged in to reply to this topic.