Example #1
0
 //Pipeline : OperatorGetTitles -> OperatorProcessRename
 private void OperatorGetTitles()
 {
     foreach (FileInfo f in SourceDir.GetFiles())
     {
         if (Path.GetExtension(f.Name) != ".pdf")
         {
             continue;
         }
         SingleFile SF = new SingleFile(f);
         SF.ProcessTitle();
         TaskQueue.Enqueue(SF);
         event1.Set();
     }
     TaskContinue = false;
     event1.Set();
 }
Example #2
0
        public static void Main(string[] args)
        {
            if (args.Length != 1)
            {
                Console.Error.WriteLine("No source file or directory\nUsage : command file");
                return;
            }
            FileInfo file = new FileInfo(args [0]);

            if ((file.Attributes & FileAttributes.Directory) != 0)
            {
                MultiFiles MF = new MultiFiles(new DirectoryInfo(file.FullName));
                MF.Process();
            }
            else
            {
                SingleFile sf = new SingleFile(file);
                sf.Process();
                //ProcessFile (file);
            }
        }