Advertisement
Guest User

Untitled

a guest
Aug 7th, 2013
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.60 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.Reflection;
  7. using System.IO;
  8.  
  9. public class SimpleFileDelete
  10. {
  11.     static void Main()
  12.     {
  13.         string newclientgame = @"C:\\Program Files\GameforgeLive";
  14.         string newclientgame32bit = @"C:\\Program Files (x86)\GameforgeLive";
  15.         string oldclientgame = @"C:\\Program Files\game(DE)";
  16.         string oldclientgame32bit = @"C:\\Program Files (x86)\game(DE)";
  17.  
  18.         if (!Directory.Exists(newclientgame))
  19.         {
  20.             System.IO.Directory.Delete(newclientgame, true);
  21.         }
  22.         else
  23.         {
  24.             System.Console.WriteLine("Wait..");
  25.  
  26.         }
  27.  
  28.  
  29.  
  30.         if (!Directory.Exists(newclientgame32bit))
  31.         {
  32.             System.IO.Directory.Delete(newclientgame32bit, true);
  33.         }
  34.             else
  35.         {
  36.             System.Console.WriteLine("Wait..");
  37.         }        
  38.  
  39.  
  40.  
  41.         if (!Directory.Exists(oldclientgame32bit))
  42.         {
  43.             System.IO.Directory.Delete(oldclientgame32bit, true);
  44.         }
  45.         else
  46.         {
  47.             System.Console.WriteLine("Wait..");
  48.         }
  49.  
  50.  
  51.  
  52.  
  53.         if (!Directory.Exists(oldclientgame))
  54.         {
  55.             System.IO.Directory.Delete(oldclientgame, true);
  56.         }
  57.         else
  58.         {
  59.             System.Console.WriteLine("No game directory found..");
  60.         }
  61.             System.IO.Directory.Delete(oldclientgame, true);
  62.         System.Console.WriteLine("Press any key to exit.");
  63.         System.Console.ReadKey();
  64.  
  65.     }
  66.                 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement