Long FIle Names

I keep my Zotero library on an external hard drive, and carry it back and forth from work to home. That way, I always have all my files with me. (I might also note that I use the Firefox plugin at work, and standalone at home, and it works seamlessly in both places, even though the library ends up with different drive letters. Kudos to the developers.) Since I keep my library in such a "dangerous" place, I back it up to my home & work machines several times a week. I do this by simply copying my entire custom directory.

At the end of each copy, Windows informs me that some of the file names (I'm up to 12) are too long and I have to skip copying them. I have determined that pretty much all of the names are from webpages (usually images) or snapshots. Is it possible to add a way for Zotero to enforce shorter filenames, and possibly remap the links within the snapshot?
  • edited July 30, 2013
    Generally speaking, Zotero enforces shorter filenames on the filesystem where the files are created or synced—or, at least, it does so for creating primary files and for syncing all files. I'm not sure if it tries to shorten secondary files in snapshots. I would think those would just be skipped if their filenames were too long for the current system, but I think we've seen some weird things before, particularly on Windows, with the OS allowing files to be created that later couldn't be accessed. Not sure if that's the issue here—you can check by trying to rename the files in the OS to the same length. But my guess is that you're just trying to back up files to a more restrictive filesystem, which arguably isn't Zotero's problem.

    No, there's no way to remap links within snapshots, but such files are usually advertising junk files that can just be deleted.
  • There is no way for you to make Zotero shorten file names in snapshots (especially after the import). You can change the filenames for pdf attachments, etc.

    For your purposes, you could create backups by zipping up the entire directory, which should eliminate the problem with long filenames. (Though I believe that zip had some path length restrictions as well)

    In general, this problem has come up before. Zotero now makes sure that the filenames are not too long for the system that the snapshot is created on, but it's obviously impossible to make sure that they are not too long when copying to a different location. I wonder though (esp. for snapshots) if there is any sense in keeping the filenames longer than 30 characters or so. IIRC the devs weren't too happy about very short file names, but I can't find the discussion right now.
  • I tried backing it up to a zip file, and I still got a warning about long filenames. Then I tried a 7-zip file, and it worked just fine. Thank you for the suggestion!
Sign In or Register to comment.