Compare commits
1 Commits
master
...
8fc4fdb849
Author | SHA1 | Date | |
---|---|---|---|
8fc4fdb849 |
20
.vscode/launch.json
vendored
20
.vscode/launch.json
vendored
@ -8,19 +8,27 @@
|
|||||||
"name": ".NET Core Launch (console)",
|
"name": ".NET Core Launch (console)",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"preLaunchTask": "build",
|
"preLaunchTask": "Build",
|
||||||
"program": "${workspaceFolder}/bin/Debug/net8.0/win-x64/File-Folder-Helper.dll",
|
"program": "${workspaceFolder}/bin/Debug/net8.0/win-x64/File-Folder-Helper.dll",
|
||||||
"args": [
|
"args": [
|
||||||
"s",
|
"s",
|
||||||
"X",
|
"X",
|
||||||
"V:/7-Question/Event 2024 Directories-xmp",
|
"P:/7-Question/Scanned Pictures II-a",
|
||||||
|
"Day-Helper-2025-08-03",
|
||||||
|
"*.tif",
|
||||||
|
"100",
|
||||||
|
"Years",
|
||||||
|
"P:/7-Question/Scanned Pictures II-c",
|
||||||
|
"s",
|
||||||
|
"X",
|
||||||
|
"P:/7-Question/Event 2024 Directories-xmp",
|
||||||
"Day-Helper-2025-07-26",
|
"Day-Helper-2025-07-26",
|
||||||
"L:/Git/AA/Rename/.vscode/.UserSecrets/secrets.json",
|
"L:/Git/AA/Rename/.vscode/.UserSecrets/secrets.json",
|
||||||
"*.xmp",
|
"*.xmp",
|
||||||
"V:/7-Question/Event 2024 Directories-xmp-moved",
|
"P:/7-Question/Event 2024 Directories-xmp-moved",
|
||||||
"s",
|
"s",
|
||||||
"X",
|
"X",
|
||||||
"V:/1-Images-A/Images-0b793904",
|
"P:/1-Images-A/Images-0b793904",
|
||||||
"Day-Helper-2024-12-17",
|
"Day-Helper-2024-12-17",
|
||||||
".job.json",
|
".job.json",
|
||||||
"thumbs.db~sync.ffs_db~verify.json~.html",
|
"thumbs.db~sync.ffs_db~verify.json~.html",
|
||||||
@ -28,7 +36,7 @@
|
|||||||
"D:/5-Other-Small/Disk/Snap2HTML/Snap2HTML.exe",
|
"D:/5-Other-Small/Disk/Snap2HTML/Snap2HTML.exe",
|
||||||
"s",
|
"s",
|
||||||
"X",
|
"X",
|
||||||
"V:/Tmp/Phares/Helper-2025-07-20",
|
"P:/Tmp/Phares/Helper-2025-07-20",
|
||||||
"Day-Helper-2025-07-20",
|
"Day-Helper-2025-07-20",
|
||||||
"871467010009.jpg",
|
"871467010009.jpg",
|
||||||
"L:/Git/AA/Rename/.vscode/.UserSecrets/secrets.json",
|
"L:/Git/AA/Rename/.vscode/.UserSecrets/secrets.json",
|
||||||
@ -74,7 +82,7 @@
|
|||||||
"\"vp154\"",
|
"\"vp154\"",
|
||||||
"s",
|
"s",
|
||||||
"X",
|
"X",
|
||||||
"V:/Tmp/Phares/Pictures/2023 TI2023.6 Fall Samsung",
|
"P:/Tmp/Phares/Pictures/2023 TI2023.6 Fall Samsung",
|
||||||
"Day-Helper-2025-07-05",
|
"Day-Helper-2025-07-05",
|
||||||
"x-653889110721.jpg~401223300869.jpg",
|
"x-653889110721.jpg~401223300869.jpg",
|
||||||
"3648,2736,1~3024,4032,6",
|
"3648,2736,1~3024,4032,6",
|
||||||
|
22
.vscode/tasks.json
vendored
22
.vscode/tasks.json
vendored
@ -43,7 +43,7 @@
|
|||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Format-Whitespaces",
|
"label": "Format Whitespaces",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
@ -53,7 +53,7 @@
|
|||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "build",
|
"label": "Build",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
@ -67,7 +67,7 @@
|
|||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "build Linux",
|
"label": "Build Linux",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
@ -81,7 +81,7 @@
|
|||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "podmanLogin",
|
"label": "Podman Login",
|
||||||
"command": "podman",
|
"command": "podman",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
@ -91,7 +91,7 @@
|
|||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "podmanBuild",
|
"label": "Podman Build",
|
||||||
"command": "podman",
|
"command": "podman",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
@ -103,7 +103,7 @@
|
|||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "podmanImageList",
|
"label": "Podman Image List",
|
||||||
"command": "podman",
|
"command": "podman",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
@ -113,7 +113,7 @@
|
|||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "podmanRun",
|
"label": "Podman Run",
|
||||||
"command": "podman",
|
"command": "podman",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
@ -127,7 +127,7 @@
|
|||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "podmanTag",
|
"label": "Podman Tag",
|
||||||
"command": "podman",
|
"command": "podman",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
@ -138,7 +138,7 @@
|
|||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "podmanPush",
|
"label": "Podman Push",
|
||||||
"command": "podman",
|
"command": "podman",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
@ -148,7 +148,7 @@
|
|||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "publish",
|
"label": "Publish",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
@ -160,7 +160,7 @@
|
|||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "watch",
|
"label": "Watch",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
|
48
ADO2025/PI6/Helper-2025-08-03.cs
Normal file
48
ADO2025/PI6/Helper-2025-08-03.cs
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace File_Folder_Helper.ADO2025.PI6;
|
||||||
|
|
||||||
|
internal static partial class Helper20250803 {
|
||||||
|
|
||||||
|
internal static void CreatedDateOffset(ILogger<Worker> logger, List<string> args) {
|
||||||
|
logger.LogInformation(args[0]);
|
||||||
|
logger.LogInformation(args[1]);
|
||||||
|
logger.LogInformation(args[2]);
|
||||||
|
logger.LogInformation(args[3]);
|
||||||
|
logger.LogInformation(args[4]);
|
||||||
|
logger.LogInformation(args[5]);
|
||||||
|
int years = int.Parse(args[3]) * -1;
|
||||||
|
if (args[4] != "Years") {
|
||||||
|
throw new NotImplementedException($"{args[4]} != Days");
|
||||||
|
}
|
||||||
|
string checkFile;
|
||||||
|
FileInfo fileInfo;
|
||||||
|
DateTime dateTime;
|
||||||
|
string searchPattern = args[2];
|
||||||
|
string fileNameWithoutExtension;
|
||||||
|
string fileNameWithoutExtensionOut;
|
||||||
|
string sourceDirectory = Path.GetFullPath(args[0].Split('~')[0]);
|
||||||
|
string destinationDirectory = Path.GetFullPath(args[5].Split('~')[0]);
|
||||||
|
if (!Directory.Exists(destinationDirectory)) {
|
||||||
|
_ = Directory.CreateDirectory(destinationDirectory);
|
||||||
|
}
|
||||||
|
string[] files = Directory.GetFiles(sourceDirectory, searchPattern, SearchOption.AllDirectories);
|
||||||
|
foreach (string file in files) {
|
||||||
|
fileInfo = new(file);
|
||||||
|
fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileInfo.FullName);
|
||||||
|
fileNameWithoutExtensionOut = fileNameWithoutExtension[^1] == '9' ?
|
||||||
|
$"{fileNameWithoutExtension[..^1]}7" :
|
||||||
|
fileNameWithoutExtension[^1] == '1' ?
|
||||||
|
$"{fileNameWithoutExtension[..^1]}3" :
|
||||||
|
fileNameWithoutExtension;
|
||||||
|
checkFile = Path.Combine(destinationDirectory, $"{fileNameWithoutExtensionOut}{fileInfo.Extension}");
|
||||||
|
if (File.Exists(checkFile)) {
|
||||||
|
logger.LogWarning("<{file}> already exists!", checkFile);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
File.Copy(file, checkFile);
|
||||||
|
dateTime = new DateTime(fileInfo.LastWriteTime.Year + years, fileInfo.LastWriteTime.Month, fileInfo.LastWriteTime.Day, fileInfo.LastWriteTime.Hour, fileInfo.LastWriteTime.Minute, fileInfo.LastWriteTime.Second);
|
||||||
|
File.SetCreationTime(checkFile, dateTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -185,6 +185,8 @@ internal static class HelperDay
|
|||||||
ADO2025.PI6.Helper20250720.WriteFaceData(logger, args);
|
ADO2025.PI6.Helper20250720.WriteFaceData(logger, args);
|
||||||
else if (args[1] == "Day-Helper-2025-07-26")
|
else if (args[1] == "Day-Helper-2025-07-26")
|
||||||
ADO2025.PI6.Helper20250726.CopyToCombinedEnumAndIndexFormat(logger, args);
|
ADO2025.PI6.Helper20250726.CopyToCombinedEnumAndIndexFormat(logger, args);
|
||||||
|
else if (args[1] == "Day-Helper-2025-08-03")
|
||||||
|
ADO2025.PI6.Helper20250803.CreatedDateOffset(logger, args);
|
||||||
else
|
else
|
||||||
throw new Exception(appSettings.Company);
|
throw new Exception(appSettings.Company);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user