Solved

Copying files from password-protected folder via LAN

Posted on 2004-04-11
5
423 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
[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
  • 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

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…
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 Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

732 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