you'd have to make a suitelet to do your file stuf...
# suitescript
c
you'd have to make a suitelet to do your file stuff and call that from the client