Ga naar de hoofdnavigatie Ga naar de hoofdinhoud Ga naar de voettekst van de pagina

Picture Organizer is a tool to make it easier to manage large numbers of images, without using databases, based on a good folder structure. When importing photos over the years with different programs and program versions, little uniformity in the directory structure remains. To make the folder structure uniform in an image folder, an application has been developed that places all images in subfolders depending on file type and recording date: DestinationDir\<FileTypeDir>\YYY0-YYY9\YYYY\YYYY-MM-DD\<FileName>. jpg. There is a choice to move or copy the files to the new location. If duplicate file names occur, these are then placed in DestinationDir\duplicates\<{GUID}>\<sequence#>-<original filename>.

  • <{GUID}> globally unique identifier
  • <sequential number> ascending number of 4 positions on the left, supplemented with zeros

The recording date is determined based on:

  1. EXIF information
  2. With WhatsApp images without EXIF info from the file name
  3. File creation date

<FileTypeDir> is determined by the file extension according to the table below:

File typeWill be placed in  
.jpeg .JPG .tif .tiff\image*  
.afphoto .CR2 .CR3 .CRW .dng .psd\raw*  
.bmp .png\web*  
.MOV .mp4\video*  
.info .ini .json .mxc3 .pp2 .pp3 .THM .url .xml .xmp\remove*  
 \noexif*  
.AAE .bib .BridgeSort .CTG .dat .docx .pdf\other*  

*These can be changed in the Registry, see table "Registry entrances"

The EXIF information is obtained with EXIFTool, a powerful command line application that can read and write Metadata from images, among other things. For more information see  exiftool Application Documentation

To use EXIFTool from Delphi we used ideas from:

The programming environment used is the Community Edition van Delphi 12.1

; Inno Setup Script V6.2.2
; Copyright (C) - 2024 Theo Langstraat
; Last change: 21-05-2024
 
#define Source_Path "C:\Users\theol\OneDrive\Documenten\Embarcadero\Studio\Projects\Picture Organizer\Win64\Release\"
#define Output_Path "C:\Users\theol\OneDrive\Documenten\Inno Setup\PicOrg"
 
#define AppDescr "Reads Exif info from jpeg files to copy and add on social media"
#define AppExeName "PicOrg.exe"
#define AppMail "theo.langstraat@outlook.com"
#define AppName "PicOrg"
#define AppPublisher "Theo Langstraat"
#define AppURL "https://www.langstraatonline.nl/tools/picorg"
#define AppVersion GetVersionNumbersString(Source_Path + AppExeName)
#define AppYear "2023"
 
[Setup]
AppId={{6E3035FA-247F-41D1-AD6F-E47BE68FB79F}
AppName={#AppName}
AppPublisher={#AppPublisher}
AppPublisherURL={#AppURL}
AppSupportURL={#AppURL}
AppUpdatesURL={#AppURL}
AppVerName={#AppName} {#AppVersion}
AppVersion={#AppVersion}
 
; specifies that Setup cannot run on anything but x64.
ArchitecturesAllowed=x64
 
; requests that the install be done in "64-bit mode" on x64, meaning it should use the native
; 64-bit Program Files directory and the 64-bit view of the registry.
ArchitecturesInstallIn64BitMode=x64
 
Compression=lzma
DefaultDirName={autopf}\{#AppPublisher}\{#AppName}
DefaultGroupName={#AppPublisher}
DisableDirPage=yes
DisableProgramGroupPage=yes
DisableWelcomePage=no
LicenseFile={#file AddBackslash(SourcePath) + "License.txt"}
OutputBaseFilename=Setup
OutputDir={#Output_Path}
SetupIconFile={#Source_Path}\..\..\PicOrg_Icon.ico
ShowLanguageDialog=no
SolidCompression=yes
UninstallDisplayIcon={#Source_Path}\..\..\PicOrg_Icon.ico
UninstallDisplayName={#AppPublisher} {#AppName} {#AppVersion}
WizardStyle=modern
 
[Languages]
Name: en; MessagesFile: "compiler:Default.isl"
Name: nl; MessagesFile: "compiler:Languages\Dutch.isl"
;Name: de; MessagesFile: "compiler:Languages\German.isl"
 
[Tasks]
;Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
 
[Files]
Source: "{#Source_Path}{#AppExeName}"; DestDir: "{app}"; Flags: ignoreversion
 
[Icons]
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExeName}"
;Name: "{autodesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: desktopicon
 
[Run]
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent