How to find all records in LastPass that have files/attachments in them?

3k views Asked by At

Exporting notes from LastPass does not export files that are in some notes so I need to go through every note that has a file in it and backup it manually. It would help to know which notes have files/attachments in them so that I do not need to open every note.

3

There are 3 answers

0
schmeel On

You can use lpass-att-export.sh as noted above, but note that the script doesn't work out of the box on a Mac:

  1. The "sed" commands in the script don't work with the Mac version of sed. I got around this by installing gsed (via MacPorts) and modifying the script to use gsed.
  2. The script doesn't properly handle attachment filenames with spaces in them. The attachment exports properly, but the exported filename is only the first part of the name (up to the first space).
0
EnglishBob1598 On

I wrote [this] on Ubuntu (on windows WSL), so not sure it will work on Mac but I suspect tweaks would be be small. It is designed to retrieve all attachments and deals with spaces in file and folder names. Credit to mindrunner for a lot of the concepts, but mine is a bit more specific with the search and retrieval - which is does by identifying each entry with an attachment first.

hope that helps.

https://github.com/englishbob1598/lastpass-cli-attachments

3
Shahar 'Dawn' Or On

The LastPass CLI open source project has a script that does just this. It's a shell script.

https://github.com/lastpass/lastpass-cli/blob/master/contrib/lpass-att-export.sh