You can't do this with a delete query since the delete query cannot delete an external file.
You need to use FSO to select the directory. Then you loop through the list of files and delete the file and if necessary, delete it from your table.
HOWEVER, the looping index gets messed up when you loop through the list forward which is the obvious direction, SO delete the files in reverse. Delete the last file, then the last file, then the last file, until there are no more files.