Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have few set of zip files on network drive with credentials to login to the folder. Files gets added on daily basis. I need to write a program to copy file from network drive to the local drive considering today's date. I have no idea on how to start with it. Can I get some help on approach?

What I have tried:

I am not sure if it is right but i tried WindowsIdentity and Impersonation.
Posted
Updated 6-Aug-18 22:14pm
Comments

1 solution

If you are going to do this a lot, the best solution is to set up the share on the network device as a virtual disk on the local machine: this is called "mapping a network drive"
How to Map a Network Drive in Windows 10[^]
You then have a drive letter - "Z:" for example - which directly accesses the folder containing the files you are interested in, and you can treat is as a "normal" folder on your own computer. Windows will re-establish the link on power up, provided that the remote computer is available.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900