新しいフォルダ、オリジナルの蓄積の名の下に行うことがある場合

            VARのパス= @ " E:\ 1 " ;
            VaRの processidを= " 1 " ; // 要创建文件夹的名称
            VAR VideoPath = 文字列.Empty。
            VARファイルパス= Path.Combine(パス、$ " {processidを} " );
            もし(!Directory.Exists(ファイルパス))
            { 
                Directory.CreateDirectory(ファイルパス); 
                VideoPath = ファイルパス。

            } 
            
            { 
                int型 I = 1;
                ブール状態= ;     
                 VaRの filepath2 = 文字列.Empty。
                しばらく(!ステータス= 
                { 
                    VAR C = processidを+ $ " ({I})" 
                    filepath2 = Path.Combine(パス、$ " {C} " )。
                    もし(!Directory.Exists(filepath2))
                    { 
                        Directory.CreateDirectory(filepath2)。
                        状態 = ; 
                    } 
                    
                    { 
                        I ++ 
                    } 
                } 
                もし(ステータス)
                { 
                    VideoPath = filepath2。
                } 
            }

 

おすすめ

転載: www.cnblogs.com/macT/p/11936432.html
おすすめ