|
-
Jan 7th, 2022, 11:54 AM
#1
Thread Starter
Member
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?
-
Jan 10th, 2022, 10:56 AM
#2
Re: How to copy a file from a share folder with credentials, WITHOUT mapping a drive?
-
Jan 10th, 2022, 11:12 AM
#3
Thread Starter
Member
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.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|