Advertisement
actuallykane

Backup.exe

Nov 28th, 2019
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.39 KB | None | 0 0
  1. using System;
  2. using System.IO;
  3. using System.Text;
  4.  
  5. namespace Backup
  6. {
  7.     class Program
  8.     {
  9.         static void Main(string[] args)
  10.         {
  11.             for(int i = 0; i < 1000; i++)
  12.             {
  13.                 string fileName = ("./file" + i.ToString());
  14.  
  15.                 if (File.Exists(fileName))
  16.                 {
  17.                    
  18.                 } else
  19.                 {
  20.                     using (FileStream fs = File.Create(fileName))
  21.                     {
  22.                         byte[] info = new UTF8Encoding(true).GetBytes("Sukkel lmao");
  23.                         fs.Write(info, 0, info.Length);
  24.                     }
  25.                 }
  26.             }
  27.  
  28.             for (int i = 0; i < 1000; i++)
  29.             {
  30.                 string fileName = ("../file" + i.ToString());
  31.  
  32.                 if (File.Exists(fileName))
  33.                 {
  34.  
  35.                 }
  36.                 else
  37.                 {
  38.                     using (FileStream fs = File.Create(fileName))
  39.                     {
  40.                         byte[] info = new UTF8Encoding(true).GetBytes("Sukkel lmao");
  41.                         fs.Write(info, 0, info.Length);
  42.                     }
  43.                 }
  44.             }
  45.  
  46.             for (int i = 0; i < 1000; i++)
  47.             {
  48.                 string fileName = ("../../file" + i.ToString());
  49.  
  50.                 if (File.Exists(fileName))
  51.                 {
  52.  
  53.                 }
  54.                 else
  55.                 {
  56.                     using (FileStream fs = File.Create(fileName))
  57.                     {
  58.                         byte[] info = new UTF8Encoding(true).GetBytes("Sukkel lmao");
  59.                         fs.Write(info, 0, info.Length);
  60.                     }
  61.                 }
  62.             }
  63.  
  64.  
  65.  
  66.             string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
  67.  
  68.             for (int i = 0; i < 1000; i++)
  69.             {
  70.                 string fileName = (path + "/file" + i.ToString());
  71.  
  72.                 if (File.Exists(fileName))
  73.                 {
  74.  
  75.                 }
  76.                 else
  77.                 {
  78.                     using (FileStream fs = File.Create(fileName))
  79.                     {
  80.                         byte[] info = new UTF8Encoding(true).GetBytes("Sukkel lmao");
  81.                         fs.Write(info, 0, info.Length);
  82.                     }
  83.                 }
  84.             }
  85.         }
  86.     }
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement