public bool DoCommand(FileInfo file) { if (string.IsNullOrEmpty(Extension)) { return(false); } if (!ApplyToDirectory && file.IsDirectory) { return(true); } file.ChangedFilename = $"{file.ChangedFilename}{(Extension[0] != '.' ? "." : "")}{Extension}"; return(true); }