Topic "WINSCP to copy & paste opened files !"

Author Message



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.

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

# Exit WinSCP

- 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)?



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.



You can post new topics in this forum

Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License