private string RenameFile(string oldPath) { string newPath = new TaggedMediaFileRenamer(oldPath, remamePattern).GetNewPath(_wordCasing); FEFileTaskSupport support = new FEFileTaskSupport(null); List <string> linkedFiles = support.GetChildFiles(oldPath, FileTaskType.Move); File.Move(oldPath, newPath); if (linkedFiles != null) { string oldName = Path.GetFileNameWithoutExtension(oldPath); string newName = Path.GetFileNameWithoutExtension(newPath); foreach (string linkedFile in linkedFiles) { string newLinkedFile = linkedFile.Replace(oldName, newName); File.Move(linkedFile, StringUtils.Capitalize(newLinkedFile, _wordCasing)); } } files[currentStep] = newPath; return(Translator.Translate("TXT_SUCCESS")); }
List <string> OnQueryLinkedFiles(string path, FileTaskType taskType) { FEFileTaskSupport support = new FEFileTaskSupport(null); if (File.Exists(path)) { return(support.GetChildFiles(path, taskType)); } return(null); }