On-fly compressing put and synchronizing files?

Advertisement

Zorg
Guest

On-fly compressing put and synchronizing files?

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

Reply with quote

Advertisement

You can post new topics in this forum