Take a look at the scripting information at mydefrag.com. Most of what you just mentioned can be handled by modifying the default scripts.
Yes. I am using the defaults to make a sample script that will come as close as possible to what I want.
I had somewhat misunderstood what FastFill does when combined with zones; now that I have a better grasp of how to use zones I think it does essentially what I was asking for re moving data into the zone that was out of it.
=> The case where it doesn't quite do what I would like is when sorting by path. Details follow <=
Basically, I don't ever want to do a full "slow optimize" sort to a large disk, because I don't trust that much disk activity.
Eventually I'll beg for a clever way to do an "imperfect slow optimize" (a more complex algorithm that would accept some gaps and other imperfections, in order to not move everything just because a few files have changed).
But I realized that I could get a "good enough" solution if the following were possible:
Consider the scenario where a whole new folder has been added to a drive. Plus various other file changes mixed in with it.
Consider the case where that folder is not in the zone I want it to go to. In my specific case, I have a temporary area for new files in the fast area at front of drive, BEFORE the dir + MFT. Now I want the new files to be moved to their proper zone. I'd like the folder to "move as a unit" -- end up together in the zone after the optimize.
I could get that without doing a full sort, if I could do a "sort but only move if more than 1% from target location".
=> So the idea is to apply the specified sort when deciding what order to "fill" the files in. But then do something like FastFill, rather than doing a normal slow sort that moves all files. <=
So if the following new files had been created in random order:
dirA/file1
dirB/file2
dirA/file2
dirA/file1
The order gaps would be filled is:
dirA/file1
dirA/file2
dirB/file1
dirB/file2
I haven't thought about how this would interact with different size gaps; I was thinking of the large gap at the end of the files in the zone, so that all the files in a dir would end up together.
=> Maybe the solution would be an option that would treat all files in a (leaf) dir as if they were part of one giant file, refusing to put them into a smaller gap. <=
Yes, if I had that as an option for FastFill, it would accomplish my goal!!
UPDATE:
Sometimes one wants several levels of dir to be close together. So a full SortByName is a good starting point by this. But since the idea is a FastFill compromise, it is fine to drop each "leaf dir full of files" into whatever gap-in-the-zone it fits in. If this is done in SortByName order, most of the time neighboring leaf dirs will end up near each other. Good enough for a quick optimize.
~TMSteve