Just purchased a Pro license and trying to wrap my head around the buttons... sorry if these questions have been asked before, just looking to get up to speed on customization.
I'm looking for to setup three simple buttons that can perform the following:
BUTTON 1:
Go to a specific (hard coded) directory:
delete any file older than 1 year (date created)
BUTTON 2:
In the current Lister:
rename all files of format "xxx-YY-MM-DD-lastname-firstname.ext" to "lastname firstname YYMMDD xxx.ext"
BUTTON 3:
In the current lister:
find all files in the current directory and all sub directories with extension ".abc"
rename the extensions of matching files to ".def"
Sorry if these are overly simplistic, just trying to get up to speed. I will pick at it while waiting for responses and if I figure it out I'll let you know.
Open the Preferences > file operations > filters. Make a new filter there, with following settings:
Type ..... equal ..... Files Date ..... not equal ..... created within ..... 1 year
Here is the button code:
Select ALL Delete FILTER "$name of your filter" Delete REMOVECOLLECTION=auto
You may also use some @confirm command¹, to ensure that you'll have a warning before deleting the files. Please note, that the command will act, as if all files are going to be deleted, but actually will work only on those, were the filter matches. You better try it with some testing folder first.
¹
@Confirm Really delete all files older than 1 year?|continue|abort
Delete REMOVECOLLECTION=auto
For Button 1 I now have the need to search several different folders (and sub folders to match old files before deleting). I tried this - and some variations - and it does not work. Any insight?
Find NAME "myfilter" IN "C:\my_directory" FILTER @confirm Delete all files older than 1 year?|Continue|Cancel
Select ALL
Delete ALL
Delete REMOVE COLLECTION=auto
I've tried all kinds of variations of the Delete Command but it doesn't seem to work.
If I put the find, confirm and Select ALL in one button and the Delete in another it seems to work...