View Single Post
Old 06-10-2015, 08:50 AM  
bigstar
FlashFXP Developer
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Sorry, I misunderstood exactly what you were trying to do.

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.

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.

I also quoted the paths, this is needed for the /move macro, but I am unsure if site chattr command can handle them, if not you may need to remove them, but otherwise they would be needed if the folder name contains any spaces.

Code:
#This script is command specific to ioFTPD servers
#only allow this command to run if the remote browser is active
/require remote
# prompt the user to select the target folder
/set @dst@ $selectfolder("Move Folder and create SymLink", "Select Folder:")
#For-each item selected
{
    /move "%f" "@dst@%f"
    site chattr +l "%f" "@dst@%f"
}
/list
bigstar is offline