Copy file passing user and password information

I need to copy an attachment to linux folder protected by user and password usinf lotusscript or java.For each folder i have diferent user and password.

I have a docuemnt configuration with this information and i want to copy the attach passing credentials.

Thanks in advance