Topic "On-fly compressing put and synchronizing files?"

Author Message
Zorg

Guest


Hello
Is there any method for on-fly compressing "synchronizing" and "put" files during commandline script execution?

My BAT file:

@echo off
rem settings for SSH connection and export files
SET WINSCP=winscp.exe
SET SSH=user:password@host
rem work directory
SET DIR_EXPORT=c:\temp\
SET DIR_IMPORT_TEMP=/tmp
rem Copy database dump, prices and logo to outer server
%WINSCP% /console /script=script.txt /log=script.log %SSH%
rem if not %errorlevel%==0 goto err
echo Export success.
goto eof
:err
echo Export failed!!!
:eof



My SCRIPT file

# Automatically answer all prompts negatively not to stall the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Change remote directory
cd %DIR_IMPORT_TEMP%
# Force binary mode transfer
option transfer binary
# Upload the file to current working directory
put %DUMP_EXPORT%
# Synchronize prices and logos
synchronize remote -permissions=666 -delete %PRICE_EXPORT% %PRICE_IMPORT%
# Call shell script for importing sql dump
call %DIR_IMPORT_TEMP%/indbiz_import.cmd
# Disconnect
close
# Exit WinSCP
exit
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
You can try to enable session-level compression.
_________________
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