Compare commits
2 Commits
4b85f8807d
...
9f4286e3e9
| Author | SHA1 | Date | |
|---|---|---|---|
| 9f4286e3e9 | |||
| 5c08ac222a |
126
.vscode/launch.json
vendored
126
.vscode/launch.json
vendored
@ -13,132 +13,16 @@
|
|||||||
"args": [
|
"args": [
|
||||||
"s",
|
"s",
|
||||||
"X",
|
"X",
|
||||||
"D:/6-Other-Large-Z/https-linux-ubuntu-server/etc",
|
"Y:/TRendlog",
|
||||||
"Day-Helper-2024-12-24",
|
"Day-Helper-2025-01-14",
|
||||||
"dorico.phares.duckdns.org",
|
"New folder*|202*",
|
||||||
"php",
|
"yyyy-MM-dd",
|
||||||
"444",
|
"444",
|
||||||
"555",
|
"555",
|
||||||
"666",
|
"666",
|
||||||
"777",
|
"777",
|
||||||
"888",
|
"888",
|
||||||
"999",
|
"999"
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"D:/5-Other-Small/Kanban/Year-Season",
|
|
||||||
"Day-Helper-2024-06-23",
|
|
||||||
"*.md",
|
|
||||||
"##_Sub-tasks",
|
|
||||||
"code-insiders",
|
|
||||||
"index.md",
|
|
||||||
"-_[,](",
|
|
||||||
"##_Done",
|
|
||||||
".kan",
|
|
||||||
"D:/5-Other-Small/Kanban/Year-Season",
|
|
||||||
"316940400000",
|
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"L:/",
|
|
||||||
"Day-Helper-2024-12-17",
|
|
||||||
"job.json",
|
|
||||||
"333",
|
|
||||||
"444",
|
|
||||||
"555",
|
|
||||||
"666",
|
|
||||||
"777",
|
|
||||||
"888",
|
|
||||||
"999",
|
|
||||||
"X",
|
|
||||||
"L:/Git/Linux-Ubuntu-Server/etc/nginx/include",
|
|
||||||
"Day-Helper-2024-09-16",
|
|
||||||
"*.conf",
|
|
||||||
"/etc/nginx/include/",
|
|
||||||
"server_name",
|
|
||||||
"proxy_pass~root",
|
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"L:/DevOps/Mesa_FI/MesaFabApproval/Fab2ApprovalTests/Programmability/Functions",
|
|
||||||
"Day-Helper-2024-12-04",
|
|
||||||
"*.sql",
|
|
||||||
"333",
|
|
||||||
"444",
|
|
||||||
"555",
|
|
||||||
"666",
|
|
||||||
"777",
|
|
||||||
"888",
|
|
||||||
"999",
|
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"L:/DevOps/Mesa_FI/MesaFabApproval",
|
|
||||||
"Day-Helper-2024-01-08",
|
|
||||||
"L:/DevOps/Mesa_FI/MesaFabApproval/Fab2ApprovalSystem/Controllers",
|
|
||||||
"true",
|
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"D:/5-Other-Small/Kanban-mestsa003/ART-SPS/2024/PI4/Sprint-4.1/126448-User-Story/.files/638675719896500885",
|
|
||||||
"Day-Helper-2024-11-15",
|
|
||||||
"*.txt",
|
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"D:/5-Other-Small/Kanban-mestsa003/ART-SPS/2024/PI4/Sprint-4.1/126448-User-Story/.files/Production__v2_57_0__BIORAD4__Stratus__1TRDS",
|
|
||||||
"Day-Helper-2024-11-15",
|
|
||||||
"*.txt",
|
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"D:/5-Other-Small/Kanban-mestsa003/ART-SPS/2024/PI4/Sprint-4.1/126448-User-Story/.files/Production__v2_57_0__BIORAD2__QS408M__FourteenPoint",
|
|
||||||
"Day-Helper-2024-11-15",
|
|
||||||
"*.txt",
|
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"D:/5-Other-Small/Kanban-mestsa003/ART-SPS/2024/PI4/Sprint-4.1/126996-User-Story",
|
|
||||||
"Day-Helper-2024-11-08",
|
|
||||||
"[].json",
|
|
||||||
"333",
|
|
||||||
"444",
|
|
||||||
"555",
|
|
||||||
"666",
|
|
||||||
"777",
|
|
||||||
"888",
|
|
||||||
"999",
|
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"D:/5-Other-Small/Kanban-mestsa003/ART-SPS/2024/PI4/Sprint-4.1/126448-User-Story/.files/Production__v2_57_0__HGCV1__pcl__Normal",
|
|
||||||
"Day-Helper-2024-10-30",
|
|
||||||
"*.txt",
|
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"D:/5-Other-Small/Kanban-mestsa003/ART-SPS/2024/PI4/Sprint-4.1/126448-User-Story/.files/Production__v2_57_0__CDE6__RsM__Normal",
|
|
||||||
"Day-Helper-2024-10-31",
|
|
||||||
"*.RsM",
|
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"L:/DevOps/Mesa_FI/File-Folder-Helper/.vscode/helper/tfs",
|
|
||||||
"Day-Helper-2024-09-11",
|
|
||||||
"https://eaf-dev.mes.infineon.com/json/work-items.json?v=2024-10-04-08-34&_=1728333679350",
|
|
||||||
"https://oi-metrology-viewer-prod.mes.infineon.com/json/work-items.json?v=2024-10-07-10-09&_=1728336047608",
|
|
||||||
"Epic|Feature|User Story",
|
|
||||||
"https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/",
|
|
||||||
"L:/DevOps/Mesa_FI/File-Folder-Helper/.vscode/helper/tfs",
|
|
||||||
"D:/5-Other-Small/Proxmox/exiftool/286628400329.jpg.jpg",
|
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"L:/DevOps/Mesa_FI/File-Folder-Helper/.vscode/helper/tfs",
|
|
||||||
"Day-Helper-2024-09-11",
|
|
||||||
"https://eaf-dev.mes.infineon.com/json/work-items.json?v=2024-10-04-08-34&_=1728333679350",
|
|
||||||
"https://oi-metrology-viewer-prod.mes.infineon.com/json/work-items.json?v=2024-10-07-10-09&_=1728336047608",
|
|
||||||
"Epic|Feature|User Story",
|
|
||||||
"https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/",
|
|
||||||
"L:/DevOps/Mesa_FI/File-Folder-Helper/.vscode/helper/tfs",
|
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"T:/MESAFIBACKLOG/06_SourceCode/MESAFIBACKLOG",
|
|
||||||
"Day-Helper-2024-01-08",
|
|
||||||
"T:/MESAFIBACKLOG/06_SourceCode/MESAFIBACKLOG/Adaptation/FileHandlers/Markdown",
|
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"L:/DevOps/Mesa_FI/File-Folder-Helper",
|
|
||||||
"Day-Helper-2024-01-08",
|
|
||||||
"L:/DevOps/Mesa_FI/File-Folder-Helper/ADO2024/PI3"
|
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
|
|||||||
@ -215,46 +215,46 @@ internal static partial class Helper20240623
|
|||||||
];
|
];
|
||||||
|
|
||||||
private static string GetSettingsLines() =>
|
private static string GetSettingsLines() =>
|
||||||
/*lang=json,strict*/ """
|
/*lang=json,strict*/ """
|
||||||
{
|
{
|
||||||
"[markdown]": {
|
"[markdown]": {
|
||||||
"editor.wordWrap": "off"
|
"editor.wordWrap": "off"
|
||||||
},
|
},
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"kanbn"
|
"kanbn"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
""";
|
""";
|
||||||
|
|
||||||
private static string GetTasksLines(string directory) =>
|
private static string GetTasksLines(string directory) =>
|
||||||
/*lang=json,strict*/ """
|
/*lang=json,strict*/ """
|
||||||
{
|
{
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"label": "File-Folder-Helper AOT s X Day-Helper-2024-06-23",
|
"label": "File-Folder-Helper AOT s X Day-Helper-2024-06-23",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe",
|
"command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe",
|
||||||
"args": [
|
"args": [
|
||||||
"s",
|
"s",
|
||||||
"X",
|
"X",
|
||||||
"{}",
|
"{}",
|
||||||
"Day-Helper-2024-06-23",
|
"Day-Helper-2024-06-23",
|
||||||
"*.md",
|
"*.md",
|
||||||
"##_Sub-tasks",
|
"##_Sub-tasks",
|
||||||
"code-insiders",
|
"code-insiders",
|
||||||
"index.md",
|
"index.md",
|
||||||
"-_[,](",
|
"-_[,](",
|
||||||
"##_Done",
|
"##_Done",
|
||||||
".kan",
|
".kan",
|
||||||
"D:/5-Other-Small/Kanban/Year-Season",
|
"D:/5-Other-Small/Kanban/Year-Season",
|
||||||
"316940400000"
|
"316940400000"
|
||||||
],
|
],
|
||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
""".Replace("{}", directory.Replace('\\', '/'));
|
""".Replace("{}", directory.Replace('\\', '/'));
|
||||||
|
|
||||||
private static void FileWriteAllText(string path, string contents)
|
private static void FileWriteAllText(string path, string contents)
|
||||||
{
|
{
|
||||||
|
|||||||
54
ADO2025/PI4/Helper-2025-01-14.cs
Normal file
54
ADO2025/PI4/Helper-2025-01-14.cs
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace File_Folder_Helper.ADO2025.PI4;
|
||||||
|
|
||||||
|
internal static partial class Helper20250114
|
||||||
|
{
|
||||||
|
|
||||||
|
private static void Rename(string[] directories, string dateFormat)
|
||||||
|
{
|
||||||
|
string[] files;
|
||||||
|
DateTime dateTime;
|
||||||
|
FileInfo fileInfo;
|
||||||
|
string checkDirectory;
|
||||||
|
foreach (string directory in directories)
|
||||||
|
{
|
||||||
|
dateTime = DateTime.MinValue;
|
||||||
|
files = Directory.GetFiles(directory, "*", SearchOption.AllDirectories);
|
||||||
|
foreach (string file in files)
|
||||||
|
{
|
||||||
|
fileInfo = new(file);
|
||||||
|
if (dateTime > fileInfo.LastWriteTime)
|
||||||
|
continue;
|
||||||
|
dateTime = fileInfo.LastWriteTime;
|
||||||
|
}
|
||||||
|
if (dateTime == DateTime.MinValue)
|
||||||
|
continue;
|
||||||
|
checkDirectory = Path.Combine(Path.GetDirectoryName(directory) ?? throw new Exception(), dateTime.ToString(dateFormat));
|
||||||
|
if (checkDirectory != directory)
|
||||||
|
{
|
||||||
|
if (Directory.Exists(checkDirectory))
|
||||||
|
continue;
|
||||||
|
Directory.Move(directory, checkDirectory);
|
||||||
|
}
|
||||||
|
Directory.SetLastWriteTime(checkDirectory, dateTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void Rename(ILogger<Worker> logger, string sourceDirectory, string searchPattern, string dateFormat)
|
||||||
|
{
|
||||||
|
string[] directories = Directory.GetDirectories(sourceDirectory, searchPattern);
|
||||||
|
logger.LogInformation("directories: {directories}", directories.Length);
|
||||||
|
Rename(directories, dateFormat);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void Rename(ILogger<Worker> logger, List<string> args)
|
||||||
|
{
|
||||||
|
string dateFormat = args[3];
|
||||||
|
string[] searchPatterns = args[2].Split('|');
|
||||||
|
string sourceDirectory = Path.GetFullPath(args[0]);
|
||||||
|
foreach (string searchPattern in searchPatterns)
|
||||||
|
Rename(logger, sourceDirectory, searchPattern, dateFormat);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -127,6 +127,8 @@ internal static class HelperDay
|
|||||||
ADO2024.PI4.Helper20241224.Compare(logger, args);
|
ADO2024.PI4.Helper20241224.Compare(logger, args);
|
||||||
else if (args[1] == "Day-Helper-2025-01-01")
|
else if (args[1] == "Day-Helper-2025-01-01")
|
||||||
ADO2025.PI4.Helper20250101.MoveToDelete(logger, args);
|
ADO2025.PI4.Helper20250101.MoveToDelete(logger, args);
|
||||||
|
else if (args[1] == "Day-Helper-2025-01-14")
|
||||||
|
ADO2025.PI4.Helper20250114.Rename(logger, args);
|
||||||
else
|
else
|
||||||
throw new Exception(appSettings.Company);
|
throw new Exception(appSettings.Company);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,20 +0,0 @@
|
|||||||
// using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
// namespace File_Folder_Helper.Models;
|
|
||||||
|
|
||||||
// internal record Host([property: JsonPropertyName("a")] string? Id,
|
|
||||||
// [property: JsonPropertyName("b")] string? Colon,
|
|
||||||
// [property: JsonPropertyName("c")] string? Hyphen,
|
|
||||||
// [property: JsonPropertyName("d")] string? Line,
|
|
||||||
// [property: JsonPropertyName("e")] string? Count,
|
|
||||||
// [property: JsonPropertyName("f")] string? Segments,
|
|
||||||
// [property: JsonPropertyName("g")] string? Type,
|
|
||||||
// [property: JsonPropertyName("h")] string? Device,
|
|
||||||
// [property: JsonPropertyName("i")] string? Name,
|
|
||||||
// [property: JsonPropertyName("j")] string? Location);
|
|
||||||
|
|
||||||
// [JsonSourceGenerationOptions(WriteIndented = true, AllowTrailingCommas = true)]
|
|
||||||
// [JsonSerializable(typeof(Host[]))]
|
|
||||||
// internal partial class HostsSourceGenerationContext : JsonSerializerContext
|
|
||||||
// {
|
|
||||||
// }
|
|
||||||
Reference in New Issue
Block a user