I´d like to help an user, who is requesting a button as simple as onlly copying dirs & contain the string "2007".
After having tried various combinations, i couldn´t find a way to achieve that.
How would the filter look? "name= 2007" & "type=folder" doesn´t seem to work. I tried
set copyfilter="2007" @dironly
COPY TO DEST
but this copies all items, regardless, if they contain "2007" or not. How´s the filter to be set & (& the results to be copied) in a code?
Note: I see Leo beat me to it, but I'll go ahead and post what I was a gonna post anyways...
Here's the way I'd go about it. And I assume you would also want to copy the contents of the matching directories that contain 2007.
First, create the filter which you can do using the Find Utility panel or press CTRL+F to use the Find tool (which is what my first screen shot shows). Set the filter up like the first screen shot shows and give it a name like Folders containing 2007.
Next create a toolbar button and set it up like the second screen shot. To test it make sure you have a source and destination lister set up (e.g. a dual pane lister) and give it a go.
John, i also tried your code, but with the same results. I changed the match to having the brackets around, but still every selected items is copied. Very strange.
Sorry, try this filter if you're using Copy FILTER="2007" like in my example.
It tells Opus to only enter folders with 2007 in the name.
Note that folders with 2007 in the name but which are below other folders (relative to the starting folder) will not be copied. Not sure if that's what you want.
If it doesn't work please provide some examples of what you do & don't want to be copied.
Ok, i found the reason. The testing folders were empty, because i assumed that doesn´t matter (since the folders name match). With any content it works now. Interesting thing, when the dirs were empty, your command deselected all matching folders.
abr with my example everything selected would be copied. The idea behind my method was to first select only the folders you want (folders with 2007 in the name) and then copy them normally.
abr with my example everything selected would be copied. The idea behind my method was to first select only the folders you want (folders with 2007 in the name) and then copy them normally.[/quote]
Yeah, most likely. It is because of the empty testing dirs, i think. Thanks you both.