Coder Social home page Coder Social logo

joepitt91 / datefix Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 190 KB

Standardise Photo and Video filenames and timestamps.

Home Page: https://www.joepitt.co.uk/Project/DateFix/

License: GNU General Public License v3.0

PowerShell 100.00%
file-name naming-conventions naming-convention photos videos

datefix's People

Contributors

joepitt91 avatar

Watchers

 avatar  avatar

Forkers

xenonabe

datefix's Issues

Add yyyyMMdd-hhmmss as a pattern match

When renaming files manually to the yyyyMMdd_hhmmss format it is easy to mistype this as yyyyMMdd-hhmmss, with a hyphen rather than an underscore.

To address this add yyyyMMdd-hhmmss as a pattern match.

Dry Run Option

Add an option to scan for and report files that would be renamed if the script was run, without making any changes, e.g. -DryRun.

Tested Command

Get-ChildItem -Recurse -File | where { $_.Name -notmatch "^[0-9]{8}_[0-9]{6}(-[^/\\?%*:|`"<>. ]+)?\.[a-z
A-Z0-9]+$" }

Add iCloud Photos Export Support

When exporting files from iCloud Photos using the desktop application files are downloaded into year folders and named IMG-[seq], where [seq] is a sequential number. The EXIF data is stripped by iCloud, however, when the desktop application downloads files it sets the Date Created, Date Modified and Date Accessed values on the file to the data the image was taken/uploaded?

  • Date Created is changed if a file is copied,
  • Date Accessed is updated when the file is accessed by certain applications, however,
  • Date Modified should remain unchanged (unless of course the file is edited).

Add a -DateModifiedFallback parameter to fallback to the Date Modified value on files where EXIF and Pattern Matches fail, rather than reporting an error and skipping the file, to allow iCloud Photos exports to be processed successfully.

-DateModifiedFallback Wrong Format

Describe the bug

When files are renamed with -DateModifiedFallback they are named yyyyMMdd-HHmmss (with a hyphen) not yyyyMMdd_HHmmss (with an underscore).

To Reproduce

Steps to reproduce the behavior:

  1. Create a folder with a file with no EXIF Data call test1.txt
  2. Run `DateFix.ps1 -Path .\Test -DateModifiedFallback
  3. See error

Expected behaviour

All renamed files should follow the convention yyyyMMdd_HHmmss (with an underscore).

Screenshots

n/a

System

  • OS (e.g. Windows 10): Windows 10
  • OS Build (e.g. 17134): 17134
  • OS Architecture (e.g. x64): x64
  • DateFix Version (e.g. v1.2): v1.7

Additional context

n/a

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.