Directory.GetFiles(IP address)?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have been using Directory.GetFiles("g://"); in my c# application. But
now my boss want's me to do Directory.GetFiles(IP address);

I have been unable to figure out how to get this to work. Any sugestions?

Thanks,
Michael.
 
Michael said:
Hi,
I have been using Directory.GetFiles("g://"); in my c# application. But
now my boss want's me to do Directory.GetFiles(IP address);

I have been unable to figure out how to get this to work. Any sugestions?

Thanks,
Michael.

Hi Michael,

May I ask what you expect it to do, so we can give you a related example, or
point you in the right direction?
 
Not sure what exactly your boss wants , but if he wants you to use a UNC
naming scheme instead of a mapped network drive, you should do something
like:

Directory.GetFiles(\\servername\sharename);
where servername is the NetBios name or ip hostname (alias or a FQN DNS
name),
alternatively you can substitute the IP adress for the 'servername' like:
Directory.GetFiles(\\192.168.0.100\sharename);
,which is a bad idea even if the IP address never changes.

Willy.


| Hi,
| I have been using Directory.GetFiles("g://"); in my c# application. But
| now my boss want's me to do Directory.GetFiles(IP address);
|
| I have been unable to figure out how to get this to work. Any sugestions?
|
| Thanks,
| Michael.
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top