Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Diagnostics;
- using System.IO;
- namespace paatotga
- {
- class Program
- {
- static void Main(string[] args)
- {
- string arguments = "";
- if (args.Count() != 0)
- {
- var pal2pace = new ProcessStartInfo();
- foreach (string file in args)
- {
- string filename = "";
- string ext = Path.GetExtension(file);
- if (ext == ".paa" || ext == ".pac")
- {
- filename = Path.GetFileNameWithoutExtension(file);
- arguments = file + " " + filename + ".tga";
- Console.WriteLine("Converting " + filename + " to " + filename + ".tga");
- pal2pace.FileName = "pal2pace.exe";
- pal2pace.Arguments = arguments;
- pal2pace.CreateNoWindow = true;
- pal2pace.UseShellExecute = false;
- Process.Start(pal2pace);
- }
- else
- {
- Console.WriteLine("Skipping: " + file);
- }
- }
- Console.WriteLine("Finished converting files to .tga");
- Console.WriteLine("Press any key to continue...");
- Console.ReadKey(true);
- }
- else
- {
- Console.WriteLine("No List Given!");
- Console.WriteLine("Press any key to continue...");
- Console.ReadKey(true);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment