namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
string path = @"F:Newgrand_ProjectG6H_5.1R_JSBusinessDlls";
string path2 = @"D:软件NGWebSite";
string prefix = @"GJS3.JS.";
List<string> binFileNames = new List<string>
{
"Controller.dll",
"Model.dll"
};
List<string> ruleFileNames = new List<string>
{
"Dac.dll",
"Dac.Interface.dll",
"Facade.dll",
"Facade.Interface.dll",
"Rule.dll",
"Rule.Interface.dll",
"Service.dll",
"Service.Interface.dll"
};
binFileNames.ForEach(p =>
{
Console.WriteLine($"{path}\bin\{prefix}{p} to {path2}\bin\{prefix}{p}");
File.Copy($"{path}\bin\{prefix}{p}", $"{path2}\bin\{prefix}{p}", true);//允许覆盖目的地的同名文件
});
ruleFileNames.ForEach(p =>
{
Console.WriteLine($"{path}\Rules\{prefix}{p} to {path2}\I6Rules\{prefix}{p}");
File.Copy($"{path}\Rules\{prefix}{p}", $"{path2}\I6Rules\{prefix}{p}", true);//允许覆盖目的地的同名文件
});
}
public static string ChangeText(string s)
{
var f = s[0];
s = s.Remove(0, 1).Insert(0, Char.ToUpper(f).ToString());
while (s.Contains("_"))
{
var index = s.LastIndexOf("_");
char c = s[index+1];
s = s.Remove(index, 2).Insert(index, Char.ToUpper(c).ToString());
}
return s;
}
}
}
{
class Program
{
static void Main(string[] args)
{
string path = @"F:Newgrand_ProjectG6H_5.1R_JSBusinessDlls";
string path2 = @"D:软件NGWebSite";
string prefix = @"GJS3.JS.";
List<string> binFileNames = new List<string>
{
"Controller.dll",
"Model.dll"
};
List<string> ruleFileNames = new List<string>
{
"Dac.dll",
"Dac.Interface.dll",
"Facade.dll",
"Facade.Interface.dll",
"Rule.dll",
"Rule.Interface.dll",
"Service.dll",
"Service.Interface.dll"
};
binFileNames.ForEach(p =>
{
Console.WriteLine($"{path}\bin\{prefix}{p} to {path2}\bin\{prefix}{p}");
File.Copy($"{path}\bin\{prefix}{p}", $"{path2}\bin\{prefix}{p}", true);//允许覆盖目的地的同名文件
});
ruleFileNames.ForEach(p =>
{
Console.WriteLine($"{path}\Rules\{prefix}{p} to {path2}\I6Rules\{prefix}{p}");
File.Copy($"{path}\Rules\{prefix}{p}", $"{path2}\I6Rules\{prefix}{p}", true);//允许覆盖目的地的同名文件
});
}
public static string ChangeText(string s)
{
var f = s[0];
s = s.Remove(0, 1).Insert(0, Char.ToUpper(f).ToString());
while (s.Contains("_"))
{
var index = s.LastIndexOf("_");
char c = s[index+1];
s = s.Remove(index, 2).Insert(index, Char.ToUpper(c).ToString());
}
return s;
}
}
}