简单的几行代码。
就不说废话了
private static string svnUpdateCommand = "TortoiseProc.exe/command:update /path:{0} /notempfile /closeonend:4"; private static string svnCommitCommand = "TortoiseProc.exe/command:commit /path:{0} /notempfile /closeonend:4"; [MenuItem("Assets/SVN/批量更新选中的文件夹", false, 0)] public static void UpdateSelectFloder() { CreatSnvBacthCommand(true); } [MenuItem("Assets/SVN/批量上传选中的文件夹", false, 0)] public static void CommitSelectFloder() { CreatSnvBacthCommand(false); } private static void CreatSnvBacthCommand(bool isUpdate) { string[] selectIds = Selection.assetGUIDs; string path = string.Empty; for (int i = 0; i < selectIds.Length; i++) { path = path + AssetDatabase.GUIDToAssetPath(selectIds[i])+ "*"; } Process myPro = new Process(); myPro.StartInfo.FileName = "TortoiseProc.exe"; string command = ""; if (isUpdate) { command = string.Format(svnUpdateCommand,path); //更新命令 }else { command = string.Format(svnCommitCommand,path); //上传命令 } myPro.StartInfo.Arguments += command; myPro.Start(); }