Auto create file with premade info

hi, I want to ask if is possible to create a file with some info automatic:
i want to select a file, for example rock.m4r
then create a .txt file with the next info on it:
Package: com.myrepospace.hateeyes.Ringtone
Name:"this must be filled with the name of the file"
Version: 1.0
Architecture: iphoneos-arm
Description: Ringtone "this must be filled with the name of the file"
Homepage: -
Maintainer: hateeyes
Author: hateeyes < hateeyes@gmail.com >
Section: Ringtones

and the file that is create will be save in the folder that the .m4r is in. I hope this is understable and can somebody help me!.

Should be pretty easy. Few questions first, though:

What do you want the .txt file to be called?

Do you want to be prompted for the name of the file (maybe with some kind of default) or should the command choose & use a name automatically without any kind of prompt?

Would the filename (or the default name) be fixed or be based on the name of the selected file?