Use this command script:
net use r: https://some.portal.org/documents [password] user:domainName\[username] copy c:\somefile.txt r:\somefile.txt