Quote:
Originally Posted by CheapSweetLife
Here is what I started with: First_for_Women_-_April_8_2024.pdf I removed all the _ from the current file names and switched them with spaces and I added some numbers for the dates. So now I have First for Women - April 08 2024.pdf. I have changed all of the files for First for Women magazines there are over 100.
So what I'm trying to do is get all of the main magazines into there own folders such as follows. First for Women which is a folder name for the main magazines. And then there will be folders titled after years. Like 2017, 2018, 2019, 2020, 2021, 2022, 2023, and 2024. And I will have the organized by year.
I plan to do the same with other magazines based on magazines by folder as well.
So here is what I want to do I want to take the date from the file name and use them for tags as well as metadata for dates as well. I have month based on spelling such as April then there is a space with a date with double digits even for something like 3 its 03 and then I also have year as a 4 digit number. How do I take the date and keep it from file name and can I use the full dates. Or should it be changed to something like April,2024 or 04,2024. How should I do this.
|
Hi CSL,
As BetterRed pointed out, calibre's file locations are managed by calibre. You can't change them.
What you can do, though, and what I think you're trying to do, is parse the dates out of the file names (on load would be best/easiest, but you can get at them after the fact also) and put them in another field. The book's 'date' field is not a bad choice.
(BTW, you don't need to remove underscores from file names, calibre does that already on loading.)
In Preferences -> Adding Books, the regular expression
Code:
(?P<title>.+) - (?P<published>[^_]+)
will extract
Code:
Title: First for Women
Published: 2024-04-08
(yes, it parsed 'April 8 2024' and turned it into 2024-04-08).
Then when you load files these two columns will be automatically extracted and stored. You might later want to go back and edit the titles to do things such as
- Append YYYY-MM to the title, so they're not all the same.
- Assign the title as the Series (I'd consider using YYYY.MM as the series_index... might need formatting to force the decimal value to be two digits, I haven't checked)
- Add a custom column (possibly calculated) to use YYYY.MM to group them into folders... or just use YYYY because if it's a monthly magazine you'll have only twelve entries per year anyway.
If you want to export the files and have them write out to custom paths, that also is something you can do... but I won't got into that right now.