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-04-2012, 02:53 AM   #1
dibblah
Junior Member
FlashFXP Registered User
 
Join Date: Aug 2010
Posts: 8
Default RNFR/RNTO using temp file

Hi!

Is it possible to have flashfxp upload and overwrite a file in this manner?

file: clientraw.txt

flashfxp renames it clientraw.txttmp and then:

RNFR clientraw.txttmp
350 RNFR accepted - file exists, ready for destination
RNTO clientraw.txt
250 File successfully renamed or moved



ie to make sure it´s a succesful upload before overwriting exiting file, it´s for a schedule so I won´t be around to check every time that it´s succesful and didn´t just leave a 0 kb file :/

Thnx in advance and hoping someone who´s good at this stuff has an answer

/Dibblah
dibblah is offline  
Old 05-04-2012, 11:06 AM   #2
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Are you seeing situations where FlashFXP is leaving a 0 kb file and not actually transferring the file, or are you just thinking ahead to avoid this type of issue in the future?

Assuming that you have FlashFXP configured to retry failed transfers and restart the transfer if stalled then this should never occur.

But if you really wanted to do something like this it could be done, however to do this is a rather advanced process.

What you would need to do is queue the file for transfer, edit the queue item properties, (right-click the queue item and select it), and then change the target name to something else, say "rfc959.txt_tmp", then click the OK button to save your changes.

Save the queue to a file, then transfer it, creating the new temporary file on the remote server.

Next you'd need to en-queue a rename operation, select the temporary file on the remote server, right-click, select EnQueue > Rename and then enter the correct name.

You should now have two entries in your queue.
1. upload the file to a temporary file name.
2. rename the temporary file to the correct name.

Save the queue file again.

Now whenever this queue runs it will upload the file and then rename it.

Some FTP servers do not allow you to rename a file if the new name already exists, in which case you would need to add a 3rd item to the queue to delete the existing file prior to the rename operation. This would be done the same way, EnQueue > Delete

The queue would then look something like this:

bigstar is offline  
Old 05-04-2012, 11:54 PM   #3
MxxCon
Super Duper
FlashFXP Beta Tester
 
Join Date: Oct 2001
Location: Brooklyn, NY
Posts: 3,881
Default

Bigstar, but this can't be done conditionally. So if the file fails to transfer, the other 2 commands will run regardless.
__________________
[Sig removed by Administrator: Signature can not exceed 20GB]
MxxCon is offline  
Old 05-05-2012, 08:53 AM   #4
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

There is some additional behind the scenes logic to this madness, but I will verify that this only executes on successful transfer. Of course the ideal logic would be nested command chaining.
bigstar is offline  
Old 05-05-2012, 06:44 PM   #5
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

It looks like I was wrong, in this specific situation the commands would still execute on transfer failure (since the delete command doesn't match the target name of the failed transfer) the only way to prevent this would be to have a way to chain commands based on successful transfer.

Perhaps this is something that could be added in the future if there was enough demand for it.
bigstar is offline  
Closed Thread

Tags
file, flashfxp, it´s, rnfr, upload

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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:34 PM.

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