Topic "create script that synchronizes files and deletes synchroniz"

Author Message
Mahdi Bashiri
[View user's profile]

Joined: 2012-04-16
Posts: 20
Hi
I have created script that synchronizes files from local path to remote site and deletes source files afterward, but in sometimes the file does not transfer completely by link down or remote site load traffic, i would like to know can i use "-criteria=size" before "-delete" option or no like this:
synchronize remote D:\IscFtp\BLC\SND_SP BLC\SND_SP -criteria=size -delete
please let me know this script line is correct ot need more issue to do this

Regards,
Mahdi
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
Please read FAQ:
https://winscp.net/eng/docs/faq_delete_synchronized_files

If that does not help, come back.
_________________
Martin Prikryl
Mahdi Bashiri
[View user's profile]

Joined: 2012-04-16
Posts: 20
prikryl wrote:
Please read FAQ:
https://winscp.net/eng/docs/faq_delete_synchronized_files

If that does not help, come back.


Hi
I used below command to auto transfer (Upload) to remote site:

winscp /command "option batch abort" "option confirm off" "open RemoteSite" "put E:\Backup_*.* / -criteria=size -delete" "exit" > E:\RemoteSiteUpload.txt

but i got below error

batch abort
confirm off
Searching for host...
Connecting to host...
Authenticating...
Using username "username".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] RemoteSite
Unknown switch 'criteria'.


please let me know how can i fix it.
Regards,
Mahdi
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
The -criteria is switch of synchronize command, not put.
https://winscp.net/eng/docs/scriptcommand_synchronize
_________________
Martin Prikryl
Mahdi Bashiri
[View user's profile]

Joined: 2012-04-16
Posts: 20
prikryl wrote:
The -criteria is switch of synchronize command, not put.
https://winscp.net/eng/docs/scriptcommand_synchronize

Hi
May i ask you to define criteria switch for put command if possible, and i would like to know how can i use syncronise command to upload only specified file ( not entire directory) to remote site.

Regards,
Mahdi
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
synchronize remote -criteria=size -filemask=file_to_synchronize.ext c:\local_folder /remote_folder
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