Topic "Synchronizing a single file from script"

Author Message
Lord Raiden
[View user's profile]

Joined: 2008-04-12
Posts: 5
First of all, Thanks for all the work put in to this project! Very nice!!!

Version 4.1 Beta. FTP.

I am using a script to synchronize remote. I've searched the forum and documents and got most of my answers but am still stuck on one issue. When I specify an entire directory, it works great:

Code:
synchronize remote styles styles -mirror -delete


But when I try to specify a single file it does nothing.

Code:
synchronize remote test.txt test.txt -mirror


I get a message at the terminal
Quote:
Nothing to synchronize
and the log shows
Quote:
Collecting synchronization list for local directory 'test.txt' and remote directory 'test.txt', mode = 0, params = 4098


Is it unable to synchronize a single file? In our case we only want to synchronize a subset of the files.

Thanks for your time! Very Happy
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
No the arguments must be paths.
But you can do:
Code:
option include test.txt
synchronize remote -mirror

It is the same.
Lord Raiden
[View user's profile]

Joined: 2008-04-12
Posts: 5
prikryl wrote:
No the arguments must be paths.
But you can do:
Code:
option include test.txt
synchronize remote -mirror

It is the same.


Thanks for your response. So if I use "include" in the root dir to mask specific files then i need to clear the include mask to use "exclude" when calling subdirectories as follows:

Code:
option include test.txt
synchronize remote -mirror
option include *
option exclude .svn
synchronize remote styles styles -mirror -delete


This appears to work from what I tried but wanted to check with you about clearing the include mask.

Thanks again for your time!!!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
Lord Raiden wrote:
So if I use "include" in the root dir to mask specific files then i need to clear the include mask to use "exclude" when calling subdirectories as follows:

Exclude and include are exclusive. Setting one clears the other.
_________________
Martin Prikryl
Lord Raiden
[View user's profile]

Joined: 2008-04-12
Posts: 5
Okay, so I think I know why I'm having a problem. Am I correct that timestamp preservation is not available in FTP?

Our server does not have SFTP so we are using FTP. If so, using "-mirror" does not work since we can't preserve the timestamp. So every time we FTP we copy the whole barn.

Any work-around to that???

Thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
Sorry, I haven't noticed that you use FTP. No, unfortunately FTP protocol does not allow updating remote timestamps Sad
_________________
Martin Prikryl
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
You can try synchronizing files with different size.
_________________
Martin Prikryl
Lord Raiden
[View user's profile]

Joined: 2008-04-12
Posts: 5
Problem with the size method is the whole binary vs ascii transfer problem. Most of our files are ascii so we'd have a lot of resending when it's not really needed when the size changes. And we have concerns about breaking things by sending them all by binary. ".htaccess" files would break and there are others too.

However, I was able to get SFTP set up and WOW your application runs AWESOME on SFTP!! VERY NICE!!! I know that your focus is on SFTP and I don't know if it is problems with FTP but I couldn't stay connected longer than 5 minutes without having to re-connect, and FYI: when transfering a lot of files it lost connection virtually every time in the middle of transfering. And despite automatically reconnecting it would often still fail out leaving files and directories only half done corrupting the web site.

But using SFTP I left it connected for 2 days straight with zero problems and transfers run perfectly EVERY TIME!!!

Many kudos on your great job on this product!!! Thanks for your time and help with questions too!
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