If you are in a folder, and select a sub-folder, and then use a filter that excludes all sub-folders (like subfolder-nomatch-*), then it will be skipped.
@toggle:disable
Set QUICKFILTERFLAGS=clear
@if:$tab:ONLY
@set tab:ONLY
Set QUICKFILTERFLAGS=clear
@if:else
Set QUICKFILTERFLAGS=set,hidedirs
@set tab:ONLY=on
@if:common
@toggle:update
Hey, just my two cents here, you can try this script. It will create new folders with the same names as those you have selected, so any subfolder or file will be copied, and then transfer the creation and modification dates to those new folders. If you're using a two-view lister, it will transfer the folders from the source to the destination, and if you're using a single-view lister, it will prompt you for a specific path to make the copy.
function OnClick(clickData) {
var sourceTab = clickData.func.sourcetab;
var destTab = clickData.func.desttab;
var cmd = clickData.func.command;
cmd.deselect = false; // Do not deselect items after running the command
var fsUtil = DOpus.FSUtil();
// If no destination, prompt the user for a directory
if (!destTab) {
var dlg = clickData.func.Dlg;
dlg.title = "Select Directory";
dlg.message = "Please select the directory where you want to copy the selected folders:";
dlg.buttons = "OK|Cancel";
dlg.defvalue = "";
dlg.max = 255;
var result = dlg.Show();
if (result === 2) { // If the user clicks "Cancel"
return;
}
var destPath = dlg.input; // Get the input directory
if (!fsUtil.Exists(destPath)) {
DOpus.Output("The entered directory does not exist.");
return;
}
destTab = { path: fsUtil.Resolve(destPath) }; // Create a simulated destination object
}
var selectedFolders = new Enumerator(sourceTab.selected_dirs);
while (!selectedFolders.atEnd()) {
var folderItem = selectedFolders.item();
var sourcePath = folderItem.realpath;
var destPath = fsUtil.Resolve(destTab.path + "\\" + folderItem.name);
// Create the folder in the destination
cmd.RunCommand('CreateFolder NAME="' + destPath + '"');
// Format the dates as required
var creationDate = folderItem.create.Format("D#yyyy-MM-dd T#HH:mm:ss");
var modificationDate = folderItem.modify.Format("D#yyyy-MM-dd T#HH:mm:ss");
// Set the dates on the destination folder
var setAttrCommand = 'SetAttr FILE="' + destPath + '" CREATED="' + creationDate + '" MODIFIED="' + modificationDate + '"';
cmd.RunCommand(setAttrCommand);
selectedFolders.moveNext();
}
}