Topic "WINSCP to copy & paste opened files !"

Author Message
alesiom911

Guest


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
Guest




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

Guest


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
Advertisements

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License