There is an example for various file operations in the Optim Sample Library (SFOPSAMP)
FOPLUAF - demonstrates use of various file operations.
Here is a link that describes the various Lua sample members.
I have never used any file operations so I can not say how will or difficult this is to implement
Good luck, let us know how thing turn out.
Bruce Fischer | Complex Data Privacy Specialist
1999 S. Bascom Ste 700
Campbell, CA 95008
Unstructured Data Masking
Data Privacy/Test data Management - fabrication, optimization, obfuscation