mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2025-12-30 22:50:04 -06:00
added variable replacement to renamer directory
This commit is contained in:
@@ -62,13 +62,12 @@
|
||||
newFile = Regex.Replace(newFile, @"\s(\.[\w\d]+)$", "$1");
|
||||
newFile = newFile.Replace(" \\", "\\");
|
||||
|
||||
string destFolder = DestinationPath;
|
||||
string destFolder = args.ReplaceVariables(DestinationPath ?? string.Empty, stripMissing: true);
|
||||
if (string.IsNullOrEmpty(destFolder))
|
||||
destFolder = new FileInfo(args.WorkingFile).Directory?.FullName ?? "";
|
||||
|
||||
var dest = args.GetSafeName(Path.Combine(destFolder, newFile));
|
||||
|
||||
|
||||
args.Logger?.ILog("Renaming file to: " + dest.FullName);
|
||||
|
||||
if (string.IsNullOrEmpty(CsvFile) == false)
|
||||
|
||||
Reference in New Issue
Block a user