this post was submitted on 09 Aug 2023
1813 points (93.2% liked)
Memes
45581 readers
1 users here now
Rules:
- Be civil and nice.
- Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.
founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I actually need to standardize my code. I've got "learning F2" as something I want to do soon. The goal: use the exif data of my pictures to create
[date in ISO 8601] - [original filename].[original file type termination]
So a picture taken the third of march 2022 titled "asdf.jpg" would become "2022-3-3 - asdf.jpg"
Help? lol
If you're on Linux exiftool can get the creation date for you:
exiftool -p '$CreateDate' -d '%Y-%m-%d' FILENAME
, and you could run tgat in a loop over your files, something like:Obviously don't justbgo running code some stranger just posted on the internet, especially as I haven't tested it, but that should copy images from the current directory to a subdirectory called 'out' with the correct filenames.
ok I think I finally need to ask
What the fuck is up with the html code? Ive seen this in a lot of posts and it just throws me every time.
Do you mean strings like
%Y
? They're not url-encoded values - they're strftime format directives.