Copy Feature (PLUS Subscription)

I have 2026.9.1-beta and used the copy files feature to copy all my messy and duplicate files into the library structure. I understand that the software will not delete the original files. Can I get a list of files successfully copied from the database? I would then create a script to delete the originals myself.

  1. Any issues with that strategy?
  2. What would be the SQL statement that gets me that?

Thanks!

Michel

CAUTION!

Before you continue: please make sure you have full backups of anything you care about, unmounted and offline when you do any commands that could result in data loss. PhotoStructure assumes no liability of harm or loss, and speaking from expeerience: xargs rm is astoundingly fast at doing damage.

Can I get a list of files successfully copied from the database

Sure:

First, though, update to today’s release (v2026.9.5) to make sure the query doesn’t trip on a prior issue.

The list tool is designed to answer this exact question:

If you have node v24 or v26 installed, you can now do this:

npx photostructure@stable list --where "DirUri.uri LIKE 'pslib:%'"

returns all files in your library.

npx photostructure@stable  list --where "DirUri.uri NOT LIKE 'pslib:%'"

Returns all the files that are not in your library.

There’s a --print0 switch designed specifically to help with use with xargs -0.

There’s also --primary or --no-primary to pick asset file variations that are or aren’t the “best” variation–but please read the deduplication page, the default idea of “best” may not match yours.

Feel free to hop into discord or post your shell script here before you pull the trigger – but recent offline backups are the only actual safe thing that will save you from missteps.

Thank you!

Just to be sure: I am running photostructure for desktop. Not running on a server. To get access to these commands, I would also install photostructure for Node on my windows PC. Is that correct?

Thanks!

Correct:

and if you have questions or things don’t seem quite right, ask here before doing anything and I can try to verify if your command and your intent will match.

(But having the offline backup is the safest approach in any event!)