i want code in c#.net to find directories and files in server location

Recommended Answers

All 2 Replies

I want a million pounds, doesn't mean I'll get it ;)

using System;
using System.IO;

namespace DW_402919
{
   class Program
   {
      static void Main(string[] args)
      {
         string[] arr_strFiles = Directory.GetFiles("*pathToFilesOnServer.*");
         foreach (string s in arr_strFiles)
         {
            Console.WriteLine(s);
         }
      }
   }
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.