Skip to content

Instantly share code, notes, and snippets.

@asolera
Created July 15, 2019 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asolera/ff8254cda0f2aca74543ac41e732b1d6 to your computer and use it in GitHub Desktop.
Save asolera/ff8254cda0f2aca74543ac41e732b1d6 to your computer and use it in GitHub Desktop.
Script de sincronização de FTP com diretório local
REM --------------------------------
REM Script de sincronização do FTP 156 com diretório local
REM Autor: Andrew Solera (asolera@prefeitura.sp.gov.br)
@ECHO OFF
SET connectionname=nome_da_conexao
SET remotedir=/path/to/file/
SET localdir=C:\local_dir
SET filemask=file_mask_????????.txt
echo Synchronizing...
"C:\Program Files (x86)\WinSCP\winscp.com" ^
/command ^
"open %connectionname%" ^
"cd ""%remotedir%""" ^
"synchronize local ""%localdir%ftp"" -filemask="%filemask%"" ^
"exit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment