How to copy a file from a share folder with credentials, WITHOUT mapping a drive?
Hi,
I'm currently mapping the share folder to a J: drive in a batch file which calls then VBScript. Then FileSystemObject.CopyFile from a subfolder on that J: drive.
But I'd like to skip the mapping to a J: drive, is possible. Is there some way to copy a file using the full share folder specification with a user id and password, without mapping to an explicit drive first?
Re: How to copy a file from a share folder with credentials, WITHOUT mapping a drive?
Re: How to copy a file from a share folder with credentials, WITHOUT mapping a drive?
Thanks jdc, but none of these posts are using credentials.
Anyway, I found out that WScript.Network.MapNetWorkDrive( Drive_s, Folder_s, False, User_s, PW_s ) doesn't require an explicit drive. The Drive_s can be an empty string, and then the UNC folder is available for copying.
Thanks, everything's good.