Go Back   FlashFXP Forums > >

General Discussion Need help? Have a problem? Let us help you. Bug reports and feature requests should be made using the Bug Tracker or Feature Tracker

Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 05-13-2015, 12:45 PM   #1
andreas
Senior Member
FlashFXP Beta Tester
 
Join Date: Jul 2002
Posts: 484
Default Move file/dir after successful action

Is it possible to make FlashFXP to move all successful uploaded (or downloaded) files to a new directory ?
For example:

I am uploading 10.000 files to an ftp.
After each successful upload I want to move each file to a new path (a remove server) that keeps processed files.
andreas is offline  
Old 05-13-2015, 09:31 PM   #2
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Well you could do something like this for upload

Instead of using the normal queue/transfer method you create a custom command and perform it instead.

(There is a bug in the current release that prevents this from working as intended)

You'll need this fix, just replace your existing flashfxp.exe with this one.

From the main menu > Commands and then from the Command dialog Add a New Command.

An example is shown below.
Code:
/require local
{
    /queue "%lp%f"
    /set @f@ %f
    /switch-activate
    {
        /enq /move "%rp@f@" "/data/storage/@f@"
    }
    /switch-activate
}
/switch-activate
/enq /clear cache /data/storage/
/switch-activate
/start
Make sure to replace /data/storage/ with the desired folder you want to move the uploads to.

This script will first check to see if the active browser is local, if not it will abort, queues the first selected file/folder in the local browser and then switch to the remote browser and enqueue a /move operation to move the folder from the target path to /data/storage/<name> switches back to the local browser and repeat until all selected items are queued, then it will switch one final time to remote and enqueue a clear cache on the /data/storage/ folder (just in case its cached) and finally /start will start transferring the queue.

You can omit the /start command or simply add a # in front to comment it out to see what the queue would look like first.

You can also assign this command to a shortcut such as (ctrl+shift+U) if you prefer to use the keyboard.
bigstar is offline  
Old 05-14-2015, 01:24 AM   #3
andreas
Senior Member
FlashFXP Beta Tester
 
Join Date: Jul 2002
Posts: 484
Default

1) Instead of defining a specific path, can I assign a relative path.
For example: I want everything to move inside a folder OK where the file is initially located


2) I think there is an issue here:
I downloaded the new version.
I don't know why but I cant save a new command

I press the "NewCommand" button > "Upload-Move"
I copy paste the text to the Command field
I assign the "Ctrl+Shift+U" shortcut key.
Apply
OK

When I enter again the menu no command exists.
Keep in mind that is the first command I create/add
andreas is offline  
Old 05-14-2015, 04:40 AM   #4
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

2) I have fixed the issue saving a new command with the following build, the problem occurred if the data file didn't already exist.

1) If I understand correctly, then something like this should work. you should use absolute paths whenever possible.

Code:
         /enq /move "%rp@f@" "%rpOK/@f@"

Last edited by bigstar; 05-14-2015 at 04:49 AM.
bigstar is offline  
Old 05-14-2015, 05:06 AM   #5
andreas
Senior Member
FlashFXP Beta Tester
 
Join Date: Jul 2002
Posts: 484
Default

Some more:
- "Esc" is not closing the "Edit Custom Commands" window

- Something bad happens here:

[13:04:49] Upload: dellomsa_5.1.0-5_amd64.deb 79,07 MB in 11 seconds (7,15 MB/s)
[13:04:49] [R] MFMT 20150324152546 /dellomsa_5.1.0-5_amd64.deb
[13:04:49] [R] 213 Modify=20150324152546; /dellomsa_5.1.0-5_amd64.deb
[13:04:49] [R] [CMD] /move "/dellomsa_5.1.0-5_amd64.deb" "/OK/dellomsa_5.1.0-5_amd64.deb"
[13:04:49] [R] RNFR /dellomsa_5.1.0-5_amd64.deb
[13:04:49] [R] 350 File or directory exists, ready for destination name.
[13:04:49] [R] RNTO /OK/dellomsa_5.1.0-5_amd64.deb

[13:04:49] [R] 550 /OK: No such file or directory.
[13:04:49] Move Failure!
[13:04:49] Transferred 1 File (79,07 MB) in 11 seconds (7,03 MB/s)
[13:04:49] Aborted
andreas is offline  
Old 05-14-2015, 07:53 AM   #6
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

The /OK/ folder must already exist since we're not creating this folder in the script.

Currently ESC does not close the window. I can change this to close when the apply button isn't enabled.
bigstar is offline  
Old 05-14-2015, 08:11 AM   #7
andreas
Senior Member
FlashFXP Beta Tester
 
Join Date: Jul 2002
Posts: 484
Default

Bug: All windows on top left corner show the current Flashfxp state.
All except "Preferences" window.

Check Snap1.png

Quote:
Originally Posted by bigstar View Post
The /OK/ folder must already exist since we're not creating this folder in the script.
The directory does exist
The correct command to be executed on local browser should be:
/enq /move "%lp@f@" "%lpOK\@f@"
The paths created are correct but command remark is to be executed on remote window!!


Quote:
Originally Posted by bigstar View Post
Currently ESC does not close the window. I can change this to close when the apply button isn't enabled.
Probably if Apply is enabled, it should ask to save or not the changes.
On the other hand, Preferences dialog closes when Esc is pressed even if Apply is enabled
Attached Thumbnails
Move file/dir after successful action-snap1-png  

Last edited by andreas; 05-14-2015 at 08:24 AM.
andreas is offline  
Old 05-14-2015, 08:37 AM   #8
andreas
Senior Member
FlashFXP Beta Tester
 
Join Date: Jul 2002
Posts: 484
Default

Check also this log:
Somehow the path is wrongly calculated

[16:30:43] [L] [CMD] /require local
[16:30:43] [L] [CMD] /queue "C:\Users\USER\Desktop\test\dellomsa_5.1.0-5_amd64.deb" This is the correct path
[16:30:43] [L] [CMD] /switch-activate
[16:30:43] [R] [CMD] /enq /move "C:\Users\USER\Documents\dellomsa_5.1.0-5_amd64.deb" "C:\Users\USER\Documents\OK\dellomsa_5.1.0-5_amd64.deb"
[16:30:43] [R] [CMD] /switch-activate
[16:30:43] [L] [CMD] /switch-activate
[16:30:43] [R] [CMD] /switch-activate
[16:30:43] [L] [CMD] /start
[16:30:43] [R] TYPE I
[16:30:43] [R] 200 Type set to I.
[16:30:43] [R] MLST dellomsa_5.1.0-5_amd64.deb
[16:30:43] [R] 550 /dellomsa_5.1.0-5_amd64.deb: No such file.
[16:30:43] [R] TYPE I
[16:30:43] [R] 200 Type set to I.
[16:30:43] [R] PASV
[16:30:43] [R] 227 Entering Passive Mode (10,128,XX,XX,240,190)
[16:30:43] [R] Opening data connection IP: 10.128.XX.XX PORT: 61630
[16:30:43] [R] STOR dellomsa_5.1.0-5_amd64.deb
[16:30:43] [R] 150 Opening BINARY mode data connection for dellomsa_5.1.0-5_amd64.deb.
[16:30:56] [R] 226 Transfer complete. 82.912.228 bytes transferred. 6.645,52 KB/sec.
[16:30:56] Upload: dellomsa_5.1.0-5_amd64.deb 79,07 MB in 12 seconds (6,38 MB/s)
[16:30:56] [R] MFMT 20150324152546 /dellomsa_5.1.0-5_amd64.deb
[16:30:56] [R] 213 Modify=20150324152546; /dellomsa_5.1.0-5_amd64.deb
[16:30:56] [R] [CMD] /move "C:\Users\USER\Documents\dellomsa_5.1.0-5_amd64.deb" "C:\Users\USER\Documents\OK\dellomsa_5.1.0-5_amd64.deb"
[16:30:56] [R] RNFR C:\Users\USER\Documents\dellomsa_5.1.0-5_amd64.deb
[16:30:56] [R] 550 /C/Users/USER/Documents/dellomsa_5.1.0-5_amd64.deb: No such file or directory.
[16:30:56] Move Failure!
[16:30:56] Transferred 1 File (79,07 MB) in 13 seconds (6,31 MB/s)
[16:30:56] Aborted
andreas is offline  
Old 05-14-2015, 10:39 AM   #9
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Quote:
The directory does exist
The correct command to be executed on local browser should be:
/enq /move "%lp@f@" "%lpOK\@f@"
The paths created are correct but command remark is to be executed on remote window!!
Ohhhh I am so sorry by the way you worded your question I thought you wanted to move the target file after upload.

This is much more simplified compared to the original code to move the target after upload.
Code:
{
    /queue "%p%f"
    /enq /move "%p%f" "%pOK/%f"
}
/start
I will respond to you other bug reports and concerns in a follow up post.
bigstar is offline  
Old 05-14-2015, 11:19 AM   #10
andreas
Senior Member
FlashFXP Beta Tester
 
Join Date: Jul 2002
Posts: 484
Default

That is working perfectly!!
andreas is offline  
Closed Thread

Tags
files, flashfxp, ftp, move, upload, action, successful, file/dir


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 03:27 AM.

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