using System;using System.IO;using log4net;namespace ConsoleApplication1{ class Program { private static readonly ILog Logger = LogManager.GetLogger(typeof(Program)); static void Main(string[] args) { string input; do { input = Console.ReadLine(); if (input != null) DeleteDir(input); } while (input != null); } private static void DeleteDir(string input) { if (Directory.Exists(input)) { Logger.InfoFormat("Deleting directory {0}", input); Directory.Delete(input, true); } else Logger.WarnFormat("Directory {0} does not exist", input); } }}
Powered by: newtelligence dasBlog 2.1.8102.813
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2012, Shawn Neal
E-mail