Solved

Filesearch/filecopy and remote permissions

Posted on 2003-11-07
3
344 Views
Last Modified: 2010-05-01
I am trying to first get a file directory and then to copy files from a computer on the network.  To make a long story short, I am having problems doing this due to issues with permissions and security on the remote computer.  Is there a way to get file directories and copy files from a remote computer but specifying access using a particular username and password other than that in use on the local computer?  I know this can be and is done when opening remote ODBC data sources.  Can it be done for simple file access?
0
Comment
Question by:beachbt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Accepted Solution

by:
bobbit31 earned 250 total points
ID: 9703076
you can map the network share (make sure you reference windows script host object under project/references):

Dim wNet as new WshNetwork
wNet.MapNetworkDrive "Z:", "\\SERVER\SHARE", , <user name>, <password>
set wNet = nothing

now you can do whatever you want w/ Z:

0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9703997
Check if that letter is not already used first.
0
 

Author Comment

by:beachbt
ID: 9704086
I'm going to accept Bobbit31's comment as the solution, though I had to do it a slightly different way.  On our systems, the drive mappings are fairly densely populated already, and in a not always predictable fashion.  So selecting a drive to map would be tricky.  But a variation on this, a Shell("NET USE \\server\share /user:<username> <pwd>") allows pretty much the same thing as mapping, but doesn't require an actual drive letter assignment.  Bobbit31 got me looking in this direction, so I'll award him the solution
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB6 / DAO 3.6 / run time error: Couldn't find installable ISAM 7 114
Using "ScreenUpdating" 6 84
Help me. 3 69
Copy a range from 1..n excel sheets to one destination sheet 2 66
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

756 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