Custom Copy MOVE FILTER command not moving folder

Hi,

I am trying to create a context menu command to MOVE selected folders and files while imposing a file-type filter.

For example, I want to:

  • select a bunch of folders and files in the source pane.
  • right-click and choose "MOVE selected ITEMS TO DESTINATION pane" (with the exception of .xlsx files).

I asked a similar question last week, except in that instance, I simply wanted to COPY the files and folders. The proposed solution from last week was to use Copy FILTER ~(*.xlsx) and this works like a champ.

However, I get the following undesired behavior if I use Copy MOVE FILTER ~(*.xlsx)

  • If I use Copy MOVE FILTER ~(*.xlsx) on a file (or files) the selected files are moved to the destination (as desired).
  • However, if I use Copy MOVE FILTER ~(*.xlsx) on a folder, the folder (and its contents) are COPIED to the destination pane and the contents of the selected folder are MOVED, but the selected folder itself is not deleted from the source pane. That is, after the command is run, the selected folder winds up empty in the source pane, but it still exists in the source pane and I would like it gone.
  • In contrast, if I simply use Copy MOVE on a selected folder, the folder and its contents are MOVED to the destination pane and the selected folder is "deleted" from the source pane (as desired).

As a shot in the dark, I also tried modifying the command to look like this:

Copy MOVE FILTER ~(*.xlsx)
Delete

but this does not delete the selected source folder either.

Any ideas as to where I've gone wrong?

Thank you.

It seems to work ok with just Copy MOVE ~(*.xlsx).

What do you want to happen if there are .xlsx files left in the source folder? If you delete the source folder, you'll also delete those .xlsx files which weren't moved.

Thank you for your response. You make a good point, but I want them deleted.

Thank you as well, but I'm getting strange behavior when I omit the FILTER argument. Specifically, if I select certain files in the source pane (then right-click and execute the Copy MOVE ~(*.xlsx) command, DO starts selecting other non-selected documents and folders in the source pane and tries to move them, too. I haven't pinned down exactly what is happening, but it seems as though Copy MOVE ~(*.xlsx) often tries to move EVERYTHING in the source pane over to the destination pane (except the .xlsx files). This includes items that I haven't selected.

Copy MOVE ~(*.xlsx) without the FILTER argument would ignore the selected files/folders and copy everything matching the wildcard (i.e. anything that isn't *.xlsx).