using System; using System.IO; using System.Windows; using System.Drawing; using System.Drawing.Imaging; namespace Utilities.SetFileAsFolderPicture { class Program { static void Main(string[] args) { if (args.Length != 1) { throw new ArgumentException("Argumentos invalidos."); } string file = args[0]; if (!File.Exists(file)) { throw new ArgumentException("El archivo \"" + file + "\" no existe."); } FolderImage fimg = new FolderImage(Path.GetDirectoryName(file)); fimg.SetBorder(1, Color.Black); fimg.SetImage(Image.FromFile(file)); } } }