View Single Post
Old 06-10-2015, 02:41 PM  
FlashFXP Developer
bigstar's Avatar
Join Date: Oct 2001
Posts: 8,012

I noticed you mentioned "macros".
Also, would you mind telling me what language is used for the RAW commands? Is there are a documentation explaining string operations?
Also, would you mind telling me how to convert that script into an ioFTPD custom command or make it executable via shortscuts to prevent me from copy+paste that script around all the time?
Macros commands are operations that are prefixed with a forward slash / and perform a desired operation with only requiring minimal information.

The language used for raw commands is custom, it is not a programming language, its sole purpose is to provide a way to simplify repetitive operations.

This is all explained in the help file, most of the information can be found under the reference section.

To create a reusable command macro you open the command editor via the main menu > Commands > Edit Commands..

Click the button to add a new command, give the command a name, and enter the command text. You can also assign a shortcut to it.

Once you save the command you'll see it listed under the commands menu.

We add one line below and make some minor changes to use regex to drop the prefix
# match <anychar><match right bracket>, set @n@ to the text following
/set @n@ $replacerx("%f", "^((.*))([\]]) (.*)$","\4")

Now we have the folder name with without the [cat no.] stored in @n@

#For-each item selected
    /set @n@ $replacerx("%f", "^((.*))([\]]) (.*)$","\4")
    /move "%f" "@dst@@n@"
    MKD "%f"
    site chattr +l "%f" "@dst@@n@"
bigstar is offline