Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- namespace RTMResendStrul
- {
- class Program
- {
- static void Main(string[] args)
- {
- try
- {
- string path = AppDomain.CurrentDomain.BaseDirectory;
- int counter = 9999113;
- String[] text = File.ReadAllLines(path + "\\RTMTest.txt");
- for (int i = 0; i < text.Length; i++)
- {
- //Skrive header til .MSG
- string[] line = text[i].Split(null);
- string posnr = line[0];
- int[] bong = new int[line.Length];
- TextWriter xuids = new StreamWriter(path + "\\" + counter + ".MSG");
- xuids.WriteLine("TO POS " + posnr + Environment.NewLine + "FROM BO" + Environment.NewLine + "TYPE RESENDLIST" + Environment.NewLine + "###");
- bong[0] = int.Parse(line[1]);
- bong[1] = int.Parse(line[2]);
- int forste = bong[0];
- int antall = bong[1] - bong[0] + 1;
- for (int g = 0; g < antall; g++)
- {
- xuids.WriteLine(forste + g);
- }
- xuids.Close();
- counter++;
- }
- }
- catch (Exception e)
- {
- System.Windows.Forms.MessageBox.Show(e.ToString());
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement