View Single Post
Old 06-10-2015, 11:58 AM  
Join Date: Feb 2012
Location: /dev/null
Posts: 40

The reason a checkbox on the move dialog wont work is because the command that needs to be performed is specific to the FTP server brand, in this case ioFTPD.
I see.

The revised code will move the folder from the current location to @dst@ and then create a symlink in the current folder pointing to the new location.
The code still has a bug. From the output log i read that the directory to apply the "CHATTR" command to does not exist. Here's the log:

[L] [CMD] /require remote
[L] [CMD] /set @dst@ $selectfolder("Move Folder and create SymLink", "Select Folder:")
[L] [CMD] /move "Test_Directory" "/ARCHiVE/Test_Directory"
[L] RNFR Test_Directory
[L] 350 Directory exists, ready for destination name.
[L] RNTO /ARCHiVE/Test_Directory
[L] 250 RNTO command successful.
[L] site chattr +l "Test_Directory" "/ARCHiVE/Test_Directory"
[L] 500 "Test_Directory: No such file or directory.
[L] [CMD] /list
So i added another line to fix that:
#For-each item selected
    /move "%f"  "@dst@%f"
    MKD "%f"
    site chattr +l "%f" "@dst@%f"
This finally does what i want. But i still have some individual requirements for the symlink naming. I'd like to strip some part(s) out of the target path name before it is created and use it to prepend it to the symlink name like for instance:

name of directory to move: [Cat.No.] Test_Directory // strip and dump the substring "[Cat.No.]"
name of target directory: /ARCHiVE/Test_Directory
name of symlink: [Cat.No.] Test_Directory // prepend the dumped substring "[Cat.No.]"
I noticed you mentioned "macros".

Would you mind hinting me to a documentation for how to write FFXP 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?

Last edited by brackebuschtino; 06-10-2015 at 12:25 PM.
brackebuschtino is offline