Directory.CreateDirectory(@"c:\A"+i);//创建文件夹0-100
}
Directory.Delete(@"c:\A", true);//删除文件夹
Directory.Move(@"c:\a", @"a:\d,");//剪切后,里面的文件和文件夹都会被移走。
string[] str1= Directory.GetFiles(@"a:\d",*mp3);//选取到这个文件夹中所有MP3
for (int i = 0; i < str1.Length; i++)
{
int index= str1[i].LastIndexOf("\\");//字符串数组方法.选为\最后一个位置,并赋值到index,字符串选取
string newStr1 = str1[i].Substring(index + 1);//字符串数组str1.从最后一个位置+1开始,赋值给newstr1
Console.WriteLine(str1[i]);