using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;namespace ConsoleApplication9
{
    class Program
    {
        static void Main(string[] args)
        {
          
            string spath;
           // if (args.Length == 0)
                spath = Directory.GetCurrentDirectory();
           // else
               // spath = args[0];
            
            
            showfiledetail(spath);
            Console.ReadKey();
        }
        public static void showfiledetail(string spath)
        {
            string[]files=Directory.GetFiles(spath);
            foreach (string sfile in files)
            {
                Console.WriteLine(getrelativename(sfile));
            }
        }
        public static string getrelativename(string spath)
        {
            int pos;
            Console.WriteLine(spath);
            for (pos = spath.Length - 1; pos > 0; pos--)
            {
                if (spath[pos] == '\\')
                    break;
            Console.WriteLine("pos={0}  ;spath[pos]={1}",pos,spath[pos]);
            }
            if (pos==spath.Length-1)
                return spath;
            else
                return spath.Substring(pos+1,spath.Length-pos-1);
            
        }
    }
  
}
有大神带我加我qq就最好了,yahoo~~~~~