Sort by filename?
I am new to Zotero and want to see if this program is suitable for me. I have an archive of thousands of sources ordered by subject and the files are named "date author subject" (e.g. 2005 Jones interviewing techniques). So far, about half are recognized and renamed by Zotero because many are scanned newspaper articles or books, many not in English. Of those, half are incorrectly recognized and usually miss important data, for example, only showing the title which is wrong.
This wouldn't be so bad if I could easily see my old file names as a sorting field, because then I could identify the file. But in the field chooser, "file" is not among the display options. I imagine this would be an easy thing to implement, but it doesn't seem present.
Am I missing something?
This tiny issue is probably a dealbreaker for me, since it makes this otherwise excellent program hard to use.
This wouldn't be so bad if I could easily see my old file names as a sorting field, because then I could identify the file. But in the field chooser, "file" is not among the display options. I imagine this would be an easy thing to implement, but it doesn't seem present.
Am I missing something?
This tiny issue is probably a dealbreaker for me, since it makes this otherwise excellent program hard to use.
If you haven't made any changes you need to keep and want to start from scratch with that option disabled, the cleanest way is to close Zotero and just delete the Zotero data directory.
If I could somehow copy the filename to a different field that *can* be displayed that I never use, for example "edition" or "court" I could use that as a first column to display. I have no idea how to do this though.
A. Separate pdf attachments from parent items:
1. Add items with bad parent metadata to a collection, e.g., "FixParentMeta"
2. Quick search ("All Fields & Tags"): .pdf
3. Click at one item in the middle/central pane
4. Edit -> Select All (or Ctrl+A): This selects only pdf attachments
5. Drag all pdf attachments away from the parent items; clear the quick search field
B. Delete bad parent items without attachments
C. Create new parent items from attachments:
1. Select all pdf files
2. Right click -> "Create Parent Item"
The new parent items have the file name in their title field.
@dstillman that would be fantastic! Please let me know how to run such a script, as I'm a novice at this.
By the way, I'm very thankful for the rapid and helpful responses to my post. I think this has created a new Zotero convert. Look forward to working with this software!
I could also imagine that a script that allows changing the itemType of many items at once could be very useful in @eversdavid 's case with thousands of items to be edited, such that e.g. newspaper articles are easily recognizable. The Zutilo batch editing tools don't seem to do this.
Then reopen Zotero, go to Tools → Developer → Run JavaScript, and paste in and run this code:
var s = new Zotero.Search();
s.addCondition('libraryID', 'is', Zotero.Libraries.userLibraryID);
s.addCondition('itemType', 'is', 'attachment');
var ids = await s.search()
for (let id of ids) {
let item = Zotero.Items.get(id);
let parentItemID = item.parentItemID;
if (!parentItemID) {
continue;
}
let parentItem = Zotero.Items.get(parentItemID);
let title = item.getField('title');
if (parentItem.getField('date') !== '') {
continue;
}
if (title.match(/^[0-9]{4}( |$)/)) {
let year = title.substr(0, 4);
parentItem.setField('date', year);
}
await parentItem.saveTx();
}
This will add the year from every child attachment to the parent item if the parent item doesn't already have a value in its Date field.