Solved

Copying files from password-protected folder via LAN

Posted on 2004-04-11
5
408 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

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