Results 1 to 3 of 3

Thread: How to copy a file from a share folder with credentials, WITHOUT mapping a drive?

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2015
    Posts
    38

    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?

  2. #2
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,525

    Re: How to copy a file from a share folder with credentials, WITHOUT mapping a drive?


  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2015
    Posts
    38

    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
  •  



Click Here to Expand Forum to Full Width