[Last Call] Learn how to a build a cloud-first strategyRegister Now


VbScript, CopyFolder with UserID & Password

Posted on 2009-02-18
Medium Priority
Last Modified: 2012-05-06
Hi Experts,

In the VB script, i need to copy one folder, from one locatin to another  in different system.

lets say Source : "\iacdev\eTeams2008 Source\"
Destination is \\eTeams2008_bkup\
Destination path is not accessible directly, i need to enter the domain name and password. how to include the user name and password, with copy folder in vbscript

Thanks Urgent
Set objFSO = CreateObject("Scripting.FileSystemObject")
    Const OverwriteExisting = TRUE
    objFSO.CopyFolder "\\iacdev\eTeams2008 Source\", "\\\eTeams2008_bkup\", True
but for this location  \\eTeams2008_bkup\ it is asking userID, password. how to inclued the user id and password in the above code.

Open in new window

Question by:ramadadi
1 Comment
LVL 65

Accepted Solution

rockiroads earned 2000 total points
ID: 23678684
Dunno if this will work for you but can you use "net" commands inside your script? You would need to run something like WShell to run it or perhaps outside, set it up then call script

see solution here (as well as WShell example)



Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem: You created a new custom form in Outlook for your contacts (added fields, deleted fields, changed the layout of fields, whatever) and made it the default form for contacts. The good news is that all new contacts will utilize the new form. T…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Viewers will learn the different options available in the Backstage view in Excel 2013.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question