Go Back   FlashFXP Forums > >

Custom Commands Download, share, or get help creating your own.

Closed Thread
 
Thread Tools Display Modes
Old 04-24-2014, 12:00 AM   #1
DayCuts
Senior Member
FlashFXP Beta Tester
 
Join Date: Dec 2003
Posts: 421
Default

1. PCRE support in $replace with capturing and replacement of captured groups in newstring if rx: form is used for substring.
Code:
$replace("<string>","<substring|rx: /substring/>","<newstring>")
Rename from "Author - Title of Publication.pdf" to "Title of Publication by Author.pdf"
Code:
{
RNFR %f
RNTO $replacerx(%f, rx: /^(..*)\S\-\S(..*)(\...*)$/, \2 by \1\3)
}
2. Queue command to add selected items to the transfer queue (for use with the already present Compare and potential Select)

3. Select command possibly with &f or similar to reference the results of the last Select or Compare
Code:
Select <string/rx: pattern>, or similar
Example use: recurse and queue matching items from multiple sub-directories. I know this is a simple example that can be done with selective transfer rules, but combining recursion and grouped command with Select and $replace(&f,...) etc opens up a lot more possibilities.
Code:
{
&cd %f
List
Select <*Dr Seuss*> OR Select <rx: ..*\Sby\SDr.?Seuss..*>
Queue
CDUP
}
There are probably other things I could recall thinking of in the past but I feel they are crossing the line between a simple custom command interface and full script-ability support.
DayCuts is offline  
Closed Thread

Tags
command, custom, opensight, provide, suggestions


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:31 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)