- Added: Possibility to use conversion date in output file path template (github issue #56).

This commit is contained in:
Adrien Allard committed 2024-01-19 14:54:54 +01:00
1 parent c2edf67467
commit 0edc325d2a
2 files changed
+4

No files matched your search

+3
View File
@@ -16,6 +16,7 @@ namespace FileConverter
private static Regex pathRegex = new Regex(@"^(?:\\\\[^\\/:*?""<>|\r\n]+\\|[a-zA-Z]:\\)(?:[^\\/:*?""<>|\r\n]+\\)*[^\.\\/:*?""<>|\r\n][^\\/:*?""<>|\r\n]*$");
private static Regex filenameRegex = new Regex(@"[^\\]*", RegexOptions.RightToLeft);
private static Regex directoryRegex = new Regex(@"^(?<drive>\\\\[^\\/:*?""""<>|\r\n]+\\|[A-Za-z]:\\)(?:(?<folders>[^\\]*)\\)*");
private static Regex dateRegex = new Regex(@"\(d:(?<format>[^)]*)\)");
public static bool IsPathDriveLetterValid(string path)
{
@@ -207,6 +208,8 @@ namespace FileConverter
outputPath = outputPath.Replace("(n:i)", numberIndex.ToString());
outputPath = outputPath.Replace("(n:c)", numberMax.ToString());
outputPath = dateRegex.Replace(outputPath, match => DateTime.Now.ToString(match.Groups["format"].Value).Replace('/', '-').Replace(':', '\''));
outputPath += "." + outputExtension;
return outputPath;
+1
View File
@@ -18,6 +18,7 @@
- Added: "Say thanks" button if you can't donate and want to keep my motivation up :).
- Added: Messages logged from main thread are now displayed in the console standard output.
- Added: Add the bookmarks in pdf when converting from word file (thanks to wangweirui).
- Added: Possibility to use conversion date in output file path template (github issue #56).
- Added: Brazilian Portuguese translation (thanks to Marhc).
- Added: Spanish translation (thanks to Chachak).
- Added: Italian translation (thanks to Davide).