WINSCP to copy & paste opened files !

Advertisement

alesiom911
Guest

WINSCP to copy & paste opened files !

Hello,

I've found out, by accident, that WINSCP enables to update (incremental backup), a newer version of file even if a XP/WIN7 client computer as already opened this specific file (same name) on the destination location.

Example:
I use SYNCBACK SE to make a backup (fast backup) of some modified files (example PDF) to a FTP server.

Then, I use the script shown below to update the file back to my network server EVEN IF A CLIENT COMPUTER HAS OPENED THE FILE (using Adobe Reader for example)!

Did you already notice this trick ?

I found it AMAZING !


You will find below a simple script in use:

# Automatically abort script on errors
option batch abort

# Disable overwrite confirmations that conflict with the previous
option confirm off

# Connect
open ftp://website:complicated@IP

# Change remote directory
cd /home/site/xxx/yyy

# Force binary mode transfer
option transfer binary

# Download the remote PDF file(s) to the specified directory and delete immediately the files after that
get -delete *.pdf "\\Server\folder\"

# Disconnect
close

# Exit WinSCP
exit

Reply with quote

Advertisement

Guest

Re: WINSCP to copy & paste opened files !

- Script that overwrites opened files -

Does all the magic comes from this line ?

# Disable overwrite confirmations that conflict with the previous
option confirm off


Would it be possible to change this script without using the FTP server (stay locally)?

Reply with quote

alesiom911
Guest

Current feedback

Well,

Sorry, I've tried again... and it didn't work anymore.

File opened through Foxit Reader on the "WINSCP Server" and the overwrite was not done.

The get command failed as soon as it has detected that one file was opened.

Maybe it depends on the application in use or the computer that has opened the file.

I will check again.



Regards,

Tony

Reply with quote

Advertisement

You can post new topics in this forum