1

so what I'm trying to do is to list information such as the names of files according to a folder path given by the user. And as it is possible to target a file server which is in a different domain, you would need to use a different user.

I use Directory.GetFiles(path) to get the files. So is there a simple or not too hard way to accomplish that?

P.S. I do all that in a simple c# console application.

[Edit]

All I could find is this: Getting the Current username when impersonated

Community
  • 1
  • 1
Some Developer
  • 229
  • 6
  • 19
  • have a look at this: http://stackoverflow.com/questions/295538/how-to-provide-user-name-and-password-when-connecting-to-a-network-share – Davide Piras Nov 09 '12 at 10:57
  • Possible duplicate: Accessing Password Protected Network Drives in Windows in C#? (http://stackoverflow.com/questions/2563724/accessing-password-protected-network-drives-in-windows-in-c) – giacomelli Nov 09 '12 at 21:08

0 Answers0