diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9d7347b..b36a566 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* bc3tech \ No newline at end of file +* @bc3tech \ No newline at end of file diff --git a/.github/workflows/build-and-pack.yaml b/.github/workflows/build-and-pack.yaml index ad32267..84f2ff0 100644 --- a/.github/workflows/build-and-pack.yaml +++ b/.github/workflows/build-and-pack.yaml @@ -31,7 +31,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: binaries - path: pub + path: pub/FileSorter.* choco-pack: needs: build runs-on: windows-latest diff --git a/.gitignore b/.gitignore index cb54884..a7772ea 100644 --- a/.gitignore +++ b/.gitignore @@ -340,4 +340,5 @@ ASALocalRun/ healthchecksdb # Chocolatey output -*.nupkg \ No newline at end of file +*.nupkg +/pub diff --git a/FileSorter.csproj b/FileSorter.csproj index d2c80b4..5ae48f1 100644 --- a/FileSorter.csproj +++ b/FileSorter.csproj @@ -1,26 +1,31 @@ - + - - Exe - net8.0-windows - FileSorter.Program - false - 0.0.1 - bc3tech - BC3 Technologies - Sorts files into datetime subfolders, optionally parsing EXIF data of photos to get accurate date/time information. - (c) BC3 Technologies - https://github.com/bc3tech/filesorter - https://github.com/bc3tech/filesorter - GitHub - filesorter - 0.0.1 - en-US - + + Exe + net8.0-windows + FileSorter.Program + false + 0.0.1 + bc3tech + BC3 Technologies + Sorts files into datetime subfolders, optionally parsing EXIF data of photos to get accurate date/time information. + (c) BC3 Technologies + https://github.com/bc3tech/filesorter + https://github.com/bc3tech/filesorter + GitHub + filesorter + 0.0.1 + en-US + - - - - + + + + + + + + + diff --git a/Program.cs b/Program.cs index 4ba290c..f5345f3 100644 --- a/Program.cs +++ b/Program.cs @@ -6,6 +6,7 @@ using System.Linq; using System.Threading.Tasks; +using Microsoft.WindowsAPICodePack.Shell.PropertySystem; using PowerArgs; @@ -141,8 +142,6 @@ private static void ProcessFile(FileInfo fi, ProgramArgs input, string outputDir { setTimestamp(); } - - } } if (!input.NoMove && !input.Recurse) @@ -222,7 +221,7 @@ void setTimestamp() try { - using var w = ps.Properties.GetPropertyWriter(); + using ShellPropertyWriter w = ps.Properties.GetPropertyWriter(); w.WriteProperty(ps.Properties.System.Photo.DateTaken, timeToUse); } catch { } @@ -236,8 +235,5 @@ void setTimestamp() } } - { - } - private static void PrintUsage() => Console.Write(ArgUsage.GenerateUsageFromTemplate()); }