Topic "Moving local to remote & copying remote to local automatically & Excluding subdirectories"

Author Message
scargo

Guest


Aloha,

I am unable to automatically look for new files with a specific file extension on the local windows directory and move them (not copy) to a specific remote UNIX directory.

I also want to copy files (not move them) with specific extensions automatically from the remote UXIX machine directory, excluding all subdirectories, to the local windows directory. I'll let UNIX take care of cleaning up old files.

In other words, I want to move in one direction and copy in the other direction automatically in the background. I'd like to try running the program as a service, using the program called "AtYourService"

I also want to exclude subdirectories from synchronization, but the program seems to include all subdirectories when doing so.

I noticed that there is a command line "Upload" but not a "Download"

Can any of these commands be run from the windows task scheduler?


Scargo
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Next version of WinSCP will support scripting to allow automation. But it won't allow transfer by extension yet.

You may partially succeed using synchronize command and its "exclude by mask" feature. Maybe you will be able to include only the files you want by excluding all other.
_________________
Martin Prikryl
barbudo
[View user's profile]

Joined: 2004-10-08
Posts: 2
I'm impatiently waiting for the new version with scripting. Any idea when it's coming out?

Thanks for the great work.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
barbudo wrote:
I'm impatiently waiting for the new version with scripting. Any idea when it's coming out?

Most probably this wednesday.
_________________
Martin Prikryl
Guest




Martin,

Mahalo nui loa for your reply. I'll download the new version and try it out.

scargo
barbudo
[View user's profile]

Joined: 2004-10-08
Posts: 2
Thanks for the new version. My goal is to automate backups from the Linux server to a local usb drive. So I created a simple script file containing:

synchronize local e:\backup\home /home
synchronize local e:\backup\var-mail /var/spool/mail
exit

Then I execute:
winscp3.com user@192.168.xx.xx /script=backup.script

It all seems to work fine but when I run this again I noticed that ALL files are copied including those that I know were not modified. In other words synchronize behaves like get recopying large amount of data unnecessarily. Could it be because of file system differences? My local box is winxp-sp2 (ntfs). Is there a way around this? Am I doing something wrong?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
barbudo wrote:
It all seems to work fine but when I run this again I noticed that ALL files are copied including those that I know were not modified.

Compare file in local and remote directories and check for timestamp. They will probably differ. There are several posts in the forum about the problem already.
_________________
Martin Prikryl
Guest




prikryl wrote:
barbudo wrote:
It all seems to work fine but when I run this again I noticed that ALL files are copied including those that I know were not modified.

Compare file in local and remote directories and check for timestamp. They will probably differ. There are several posts in the forum about the problem already.


I'm lost with the option ins remote update vs. sync. I don't think the english translation is very good, could someone explain how these procedures work and differ?

Yes, I want a local directory with updated content to check the remote directory and update any NEWER files, but I can't determine which method is needed and which method will FUBAR the whole thing.

thanks.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Quote:
Yes, I want a local directory with updated content to check the remote directory and update any NEWER files, but I can't determine which method is needed and which method will FUBAR the whole thing.

If all files are uploaded every time, it is probably because there is some problem with timestamps.
Login with WinSCP and check the timestamps in panels. There will probably be some difference. Let me know what difference. Also let me know what protocol do you use, SCP or SFTP?
_________________
Martin Prikryl
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