Hi there. I'm basically looking for a script that will use a hotkey to select all the files with specific user defined file extensions within one folder. The reason being I want to delete downloaded files in multiple .rar files after being extracted.
ie, one hotkey selects all .rar, .sfv, etc... in a single active folder.
Anything that currently does this? Thank you.
Script that will select files with a certain extension?
-
Famin3
- Posts: 2
- Joined: 07 Jul 2009 04:37
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: Script that will select files with a certain extension?
Hi and Welcome to the Club,Famin3 wrote:Hi there. I'm basically looking for a script that will use a hotkey to select all the files with specific user defined file extensions within one folder. The reason being I want to delete downloaded files in multiple .rar files after being extracted.
ie, one hotkey selects all .rar, .sfv, etc... in a single active folder.
Anything that currently does this? Thank you.
Go to menu "User | Manage Commands" and click on Category "Run script". On the right, click new and add new command, now copy/paste the following in the Script field below:
input $filter, "Enter pattern to select", "*.rar|*.sfv"; selfilter $filter;
And finally, assign your shortcut from the button "Assign Keyboard shortcut".
Tip: easier way without all this hassle would be to, select the extensions (one of each extension type is enough) and press ctrl+alt+j . This will show only those extensions you selected, now select all files (ctrl+a) and delete.
-
Famin3
- Posts: 2
- Joined: 07 Jul 2009 04:37
Re: Script that will select files with a certain extension?
Hey thanks heaps! I actually modified your script there so that theres no popup box and also to include more of the rar files.
This works wonders for deleting lots of left over rar files!
Code: Select all
set $filter, "*.rar|*.sfv|*.r00|*.r01|*.r02|*.r03|*.r04|*.r05|*.r06|*.r07|*.r08|*.r09|*.r10|*.r11|*.r12|*.r13|*.r14|*.r15|*.r16|*.r17|*.r18|*.r19|*.r20|*.r21|*.r22|*.r23|*.r24|*.r25|*.r26|*.r27|*.r28|*.r29|*.r30|*.r31|*.r32|*.r33|*.r34|*.r35|*.r36|*.r37|*.r38|*.r39|*.r40|*.r41|*.r42|*.r43|*.r44|*.r45|*.r46|*.r47|*.r48|*.r49|*.r50|*.r51|*.r52|*.r53|*.r54|*.r55|*.r56|*.r57|*.r58|*.r59|*.r60|*.r61|*.r62|*.r63|*.r64|*.r65|*.r66|*.r67|*.r68|*.r69|*.r70|*.r71|*.r72|*.r73|*.r74|*.r75|*.r76|*.r77|*.r78|*.r79|*.r80|*.r81|*.r82|*.r83|*.r84|*.r85|*.r86|*.r87|*.r88|*.r89|*.r90|*.r91|*.r92|*.r93|*.r94|*.r95|*.r96|*.r97|*.r98|*.r99"; selfilter $filter;-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: Script that will select files with a certain extension?
You could even go a step further and use wildcards to shorten that:
Code: Select all
set $filter, "*.rar|*.sfv|*.r##"; selfilter $filter;-
admin
- Site Admin
- Posts: 66075
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Script that will select files with a certain extension?
You could even omit the variable:TheQwerty wrote:You could even go a step further and use wildcards to shorten that:Code: Select all
set $filter, "*.rar|*.sfv|*.r##"; selfilter $filter;
Code: Select all
selfilter "*.rar|*.sfv|*.r##";Code: Select all
selfilter "*.rar;*.sfv;*.r##";FAQ | XY News RSS | XY X
-
fishgod
- Posts: 231
- Joined: 03 Feb 2008 00:40
- Location: Sankt Augustin (near Bonn), Germany
Re: Script that will select files with a certain extension?
You can also automate this by using the following script:serendipity wrote:... now select all files (ctrl+a) and delete.
Code: Select all
#250; //select all items (Edit | Select All)
#169; //delete selected files (File | Delete)Operating System: Win10 x64 / Win11 x64 / almost allways newest XY-beta
totally XYscripting-addicted
totally XYscripting-addicted
-
Pagat
- Posts: 306
- Joined: 09 Oct 2007 21:23
- Location: Austria
Re: Script that will select files with a certain extension?
and to combine this in only one command you could also use this:
Only downside here is, that you can't use "##" to delete only numbers but you have to use "??" which would also delete ".rxy"...
Code: Select all
::delete 1, 0, "<curpath>\*.r?? | <curpath>\*.sfv";
XYplorer Beta Club