Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* bc3tech
* @bc3tech
2 changes: 1 addition & 1 deletion .github/workflows/build-and-pack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -340,4 +340,5 @@ ASALocalRun/
healthchecksdb

# Chocolatey output
*.nupkg
*.nupkg
/pub
49 changes: 27 additions & 22 deletions FileSorter.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<StartupObject>FileSorter.Program</StartupObject>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>0.0.1</Version>
<Authors>bc3tech</Authors>
<Company>BC3 Technologies</Company>
<Description>Sorts files into datetime subfolders, optionally parsing EXIF data of photos to get accurate date/time information.</Description>
<Copyright>(c) BC3 Technologies</Copyright>
<PackageProjectUrl>https://github.com/bc3tech/filesorter</PackageProjectUrl>
<RepositoryUrl>https://github.com/bc3tech/filesorter</RepositoryUrl>
<RepositoryType>GitHub</RepositoryType>
<PackageTags>filesorter</PackageTags>
<AssemblyVersion>0.0.1</AssemblyVersion>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<StartupObject>FileSorter.Program</StartupObject>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>0.0.1</Version>
<Authors>bc3tech</Authors>
<Company>BC3 Technologies</Company>
<Description>Sorts files into datetime subfolders, optionally parsing EXIF data of photos to get accurate date/time information.</Description>
<Copyright>(c) BC3 Technologies</Copyright>
<PackageProjectUrl>https://github.com/bc3tech/filesorter</PackageProjectUrl>
<RepositoryUrl>https://github.com/bc3tech/filesorter</RepositoryUrl>
<RepositoryType>GitHub</RepositoryType>
<PackageTags>filesorter</PackageTags>
<AssemblyVersion>0.0.1</AssemblyVersion>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="PowerArgs" Version="4.0.3" />
<PackageReference Include="WindowsAPICodePack" Version="8.0.4" />
</ItemGroup>
<ItemGroup>
<Compile Remove="choco\**" />
<EmbeddedResource Remove="choco\**" />
<None Remove="choco\**" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="PowerArgs" Version="4.0.3" />
<PackageReference Include="WindowsAPICodePack" Version="8.0.9" />
</ItemGroup>
</Project>
8 changes: 2 additions & 6 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Linq;
using System.Threading.Tasks;

using Microsoft.WindowsAPICodePack.Shell.PropertySystem;

using PowerArgs;

Expand Down Expand Up @@ -141,8 +142,6 @@ private static void ProcessFile(FileInfo fi, ProgramArgs input, string outputDir
{
setTimestamp();
}

}
}

if (!input.NoMove && !input.Recurse)
Expand Down Expand Up @@ -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 { }
Expand All @@ -236,8 +235,5 @@ void setTimestamp()
}
}

{
}

private static void PrintUsage() => Console.Write(ArgUsage.GenerateUsageFromTemplate<ProgramArgs>());
}
Loading