osxutils can do this for you with the help of "do shell script".
see command "setfctypes"

H =:o) L G I


> ------------------------------
>
> Date:    Mon, 1 Dec 2008 18:41:47 -0500
> From:    Mark Lively <[log in to unmask]>
> Subject: Re: help with resource forks...
>
> Ah.. its not that the resource fork is missing, its that the file type
> is being lost.  If the files have the proper extension then the OS
> should be able to recreate it on its own.  No idea of what it should
> be though.
>