I have a WordPress install that's using about 10,000 images. I'd like to export all filenames used in WordPress to a file, filenames.log
filenames.log would look like this:
car.jpg
boat.jpg
milf.jpg
car2.jpg
other.jpg
etc…
The reason I'm doing this is that I have orphaned images in /uploads, and I want to run a delete operation and exclude these filenames that are actually in use.
What command could I run to generate such a file?
Thanks!
Best Answer
Pure MySQL, be sure to correct it for your desired filepath
/tmp/filenames.log
: (Thanks Phil for the select query)