Why do you need to login box and capture the username/password? Does the NAS not support ACLs and NT/AD integration for authentication purposes?

If you want to know whether your files copied correctly, jsut evaluate the @ERROR macro right after the COPY command to detect potential copy errors.

If you really want an absolutely uique random number, then generate one with this UDF: CreateGUID - Creates a GUID (globally unique identifier) and attach it after the date/time-stamp.
_________________________
There are two types of vessels, submarines and targets.