public override void Execute(string directory, int? seconds)
        {
            var dirInfo = new DirectoryInfo(directory);
              foreach (var fileInfo in dirInfo.GetFiles("*.*", SearchOption.AllDirectories)) {
            if ((fileInfo.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden
              || !_extensionList.Contains(fileInfo.Extension.ToLower())) {
              continue;
            }

            var pictFile = new PictureFile(fileInfo.FullName);
            if (pictFile.HasRecordingDate())
            {
              fileInfo.CreationTime = pictFile.HasShootingDate() ? pictFile.ShootingDate : pictFile.RecordingDate;
            }
              }
        }
        protected void MovePictureDate(string directory, int seconds, bool recursive)
        {
            var dirInfo = new DirectoryInfo(directory);
              foreach (var fileInfo in dirInfo.GetFiles("*.*", recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly)) {
            if ((fileInfo.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden
              || !_extensionList.Contains(fileInfo.Extension.ToLower())) {
              continue;
            }

            var pictFile = new PictureFile(fileInfo.FullName);
            if (pictFile.HasRecordingDate()) {
              pictFile.MoveShootingDate(seconds);
              pictFile.ApplyChanges();
              fileInfo.CreationTime = pictFile.ShootingDate;
            }
              }
        }
        public override void Execute(string directory, int? seconds)
        {
            if (string.IsNullOrEmpty(Directory) || string.IsNullOrEmpty(FileFormat)) {
            throw new Exception("Directory or file format is undefined");
              }
              if (!FileFormat.Contains("{0}")) {
            throw new Exception("File format is invalid");
              }
              var files = GetFileList(Directory, Recursive);
              if (files == null) {
            throw new Exception("Directory does not exist or files cannot be retrieved");
              }

              var nbFiles = files.Count;
              foreach (var fileInfo in files) {
            var pictFile = new PictureFile(fileInfo.FullName);
            fileInfo.MoveTo(Path.Combine(
              fileInfo.DirectoryName,
              string.Format(FileFormat, fileInfo.Name, pictFile.ShootingDate.ToString(DateFormat))
            ));
              }
        }
 private string GetPictureDetail(string filepath)
 {
     var picFile = new PictureFile(filepath);
       return string.Format("Date : {0}", picFile.ShootingDate);
 }