Attache a file to Documents module via sugar bean

Hi All,


            This is a continuation of Link

$cmd="cp myfolder/".$this->bean->id.".pdf upload/".$pdfId;//send my file to the upload folder
$docbean = BeanFactory::newBean("Documents");
$docbean->name = $filename;

I have a file in a folder name myfolder.

Now i want to attach it to the documents module via sugar bean.

Can we do it using sugar bean.

Can any one throw some lights on it.

André Lopes Francesca Shiekh hats