Directory listing problem

The directory field in the tag panel shows the working directory which is the folder where the last loading action started.
If you want to be the working directory to be the same as the file direcrtory, load only files from one folder at a time.

It is already possible to import the folder name into a tag field, see the FAQs: