/// <summary>
        /// 将所有路径转换成唯一的路径,如果有同名路径,则在后面自动标号(如:a.txt => a(1).txt、d:\a\ => d:\a(1)\)
        /// 1、返回的列表与源列表的顺序是一样的
        /// 2、传入的路径必须是标准的路径,并且这些路径可能同时包含文件路径与文件夹路径
        /// </summary>
        public static List <string> ConvertPathToUniqueList(List <string> standardPathList)
        {
            if (standardPathList.IsNullOrEmpty())
            {
                return(new List <string>());
            }
            var hs    = new HashSet <string>();
            var tpLst = new List <Tuple <string, string> >();
            var reg   = new Regex(@"\((?<idx>\d+)\)$");

            standardPathList.ForEach(p =>
            {
                if (string.IsNullOrWhiteSpace(p))
                {
                    tpLst.Add(new Tuple <string, string>(p, p));
                    return;
                }

                var isFolder = ComFile.IsFolderPathByCharFlag(p);
                var tempPath = p;

                //无限循环计算唯一的路径
                while (true)
                {
                    var key = tempPath.ToUpper().TrimEnd('\\');

                    //如果当前路径在当前时刻未重复,则直接返回结果
                    if (!hs.Contains(key))
                    {
                        hs.Add(key);
                        break;
                    }

                    //如果当前不唯一,则更新名称后再判断是否唯一
                    if (isFolder)
                    {
                        var name    = ComFile.GetPathFolderName(tempPath, true);
                        var newName = string.Empty;
                        var mt      = reg.Match(name);
                        if (mt.Success && mt?.Groups?.Count > 0)
                        {
                            newName = reg.Replace(name, $"({Convert.ToInt32(mt.Groups["idx"].Value) + 1})");
                        }
                        else
                        {
                            newName = $"{name}(1)";
                        }
                        tempPath = ComFile.ChangePathByFolderName(tempPath, newName, true);
                    }
                    else
                    {
                        var name    = ComFile.GetFileName(tempPath, false);
                        var ext     = ComFile.GetExtName(tempPath);
                        var newName = string.Empty;
                        var mt      = reg.Match(name);
                        if (mt.Success && mt?.Groups?.Count > 0)
                        {
                            newName = reg.Replace(name, $"({Convert.ToInt32(mt.Groups["idx"].Value) + 1})");
                        }
                        else
                        {
                            newName = $"{name}(1)";
                        }
                        tempPath = ComFile.ChangePathByFileName(tempPath, ComFile.AppendExtToPath(newName, ext));
                    }
                }

                tpLst.Add(new Tuple <string, string>(p, tempPath));
            });

            return(tpLst.Select(k => k.Item2).ToList());
        }