Skip to content

Instantly share code, notes, and snippets.

@abacaj
Created August 24, 2016 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abacaj/07d08df26159f43e1d57677aafa0ff45 to your computer and use it in GitHub Desktop.
Save abacaj/07d08df26159f43e1d57677aafa0ff45 to your computer and use it in GitHub Desktop.
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter base directory:");
var basePath = Console.ReadLine();
Console.WriteLine("Enter destination directory (this will be created for you, make sure it doesn't exist):");
var destination = Console.ReadLine();
var directories = System.IO.Directory.EnumerateDirectories(basePath);
foreach (var directory in directories)
{
System.IO.Directory.Move(directory, destination);
}
if (Console.ReadKey().Key == ConsoleKey.Spacebar)
{
System.Environment.Exit(0);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment