Solved

Filesearch/filecopy and remote permissions

Posted on 2003-11-07
3
346 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

705 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