Solved

Copying files from password-protected folder via LAN

Posted on 2004-04-11
5
391 Views
Last Modified: 2012-05-04
Hi experts,
I need to copy some files from password-protected folders via LAN. I guess there should be 2 (or more) ways to do it.
- First way is to use Windows API function within VB code.
-The other one is to use VB6.0 itself FileSystemObject.
I can easily copy files if folders that contain the files are NOT password-protected: Using
VB6.0 FileSystemObject just setting like
               
         FSys.CopyFile "\\RemoteMachine\Folder1\*.txt",  "\c:\MyFilesFolder"

where FSys is VB6.0  FileSystemObject.

My problem is Folder1 is now password-protected.

Need a help to solve this task.
Thanks in advance,
Ganna
0
Comment
Question by:Ganaa
  • 2
5 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 10803580
>>Need a help to solve this task.<<
And we need your help to maintain this very old open question:
10/07/2003 20 Moving database file from a computer to ...  Open Microsoft SQL Server
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_20760078.html
0
 
LVL 7

Accepted Solution

by:
CleffedUp earned 50 total points
ID: 10804314
Prior to copy you can authenticate to the target machine...

Shell "net use  \\MachineName\c$ /user:username password", vbHide
or
Shell "net use  \\MachineName\MyFilesFolderShare /user:username password", vbHide

Then copy away!

Regards
0
 

Author Comment

by:Ganaa
ID: 10832254
Thanks for the help. It gives no error, but doesn't work. Could you please be more in detail, i.e, provide code fragment or refer something
Ganna  
0
 

Author Comment

by:Ganaa
ID: 11255617
I didn't realize that net use is a MS DOS command. It works now. Thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now