The fancy file delete module did not work at all for me. Here is a more manual alternative.
To delete files from a folder that are not in the managed file table you can:
1) Create a list of all the managed files:
mysql whateverdb -e "select filename from file_managed" > ~/managed-files.txt
2) Delete all files from a directory that are not in that list. To do this I used a small bash script:
for FILE in $IMG_FOLDER/*; do
if ! grep "$FILE" "$EXCLUDES"; then
echo "Deleting $FILE"
rm -f "$FILE"
Just change the
IMG_FOLDER variable to the path of whatever folder you want to delete files from (and update the path to your excludes file)