View Single Post
Old 03-07-2017, 03:57 PM  
bigstar
FlashFXP Developer
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default [script] Use WinRAR to compress folder and then delete it

Code:
# require the local browser, otherwise abort the script
/require local

# display confirmation prompt
/confirm "Compress "%f" and then delete it?"

# display busybox to allow the user to abort the script
/busybox

# for-each item selected perform the following commands
{
    #execute WinRAR with desired flags, adjust these flags to suite your own needs
    /run "C:\Program Files\WinRAR\WinRAR.exe" "%lp" a -ibck -rv10 -m5 -s -rr -r -ep1 -ap "%f.rar" "%f"

    #if WinRar fails with an error the next command does not execute

    #delete the folder and everything within it. 
    /deletree %p%f
}
bigstar is offline