Exclude certain file on Synchronize
Is there a way to exclude certain file when using
synchronize
. If yes, could you give me a simple example code.
Thanks
Advertisement
synchronize
. If yes, could you give me a simple example code.
Advertisement
synchronize -filemask=|<yourfilename> ...
Advertisement
-filemask=<2012-02-01 00:00:00
>= 2012-01-01 00:00:00
, where will I insert the command:
open ftp://username:password@ftpserver.itu.int synchronize local C:\TEST\docs /docs close
synchronize -filemask="<2012-02-01 00:00:00" local C:\TEST\docs /docs
Advertisement
*.doc*
) only using the commands below, but it seems, it doesn't work:
option include=*.doc* synchronize -filemask="<2012-02-01 00:00:00" local C:\TEST\docs /docs
synchronize -filemask="<2012-02-01 00:00:00" local C:\TEST\docs /docs -include="*.doc*"
-filemask
switch overrides include
option (which is obsolete anyway with 5.0.6).
-include
switch.
synchronize -filemask="*.doc*<2012-02-01 00:00:00" local C:\TEST\docs /docs
*.doc*
) and Powerpoint (*.ppt*
) files, what will be the command. I tried the command below, but it doesn't work.
synchronize -filemask="*.doc* *.ppt* <2012-02-01 00:00:00" local C:\TEST\docs /docs
synchronize
?
Advertisement
synchronize -filemask="*.doc*<2012-02-01; *.ppt*<2012-02-01" local C:\TEST\docs /docs
Do not understand.Also, is it possible to have the new switch commands available for synchronize?
synchronize
command, with examples? If there is none yet, it's ok.
The up-to-date documentation is on the same page all the time:For my other question, is there a web page describing the newsynchronize
command, with examples? If there is none yet, it's ok.
exclude
option to exclude a file .protftpd.fifo
because the file can for some reason not be transferred. The file is located on a NAS with Linux, where I have shared a folder via SMB. My script is otherwise working fine.
option exclude .proftpd.fifo
... include |.proftpd.fifo Comparing... Local '\\backup\backup3\Old' => Remote '/Old' Synchronizing... Local '\\backup\backup3' => Remote '/' \...\.proftpd.fifo | 0 B | 0,0 KB/s | binary | 0% ...
Advertisement
/log=C:\path\to\winscp.log
command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private..protftpd.fifo
, the rest is secondary. Note further that the source folder \\backup\backup3\
is on an FTP server as well, but since WinSCP cannot copy directly from one FTP server to another, I had to share the folder on the source FTP server as an SMB share.
D:\Klinikdokumenter\Klinik - EDB\Klinik Backup\NAS Synchronization>"C:\Users\Administrator\AppData\Local\Programs\WinSCP\WinSCP.com" /loglevel=2 /loglevel=2 /log=logfi le.log /xmllog=logfile.xml /script=glostrup-test2.txt batch on reconnecttime 60 include |.proftpd.fifo Connecting to fjernskrivebord.tg150.dk:8021 ... Connected Starting the session... Session started. Active session: [1] **********@fjernskrivebord.tg150.dk Comparing... Local '\\backup\backup3' => Remote '/Test' Synchronizing... Local '\\backup\backup3' => Remote '/Test' \...\.proftpd.fifo | 0 B | 0,0 KB/s | binary | 0% Lost connection. Timeout detected. (control connection) Could not retrieve file information Can't get attributes of file '/Test/.proftpd.fifo'. (A)bort, (R)econnect (0 s): Reconnect Connecting to fjernskrivebord.tg150.dk:8021 ... Connected Starting the session... Session started. Lost connection. Timeout detected. (control connection) Could not retrieve file information Can't get attributes of file '/Test/.proftpd.fifo'. (A)bort, (R)econnect (4 s): Abort Lost connection. Timeout detected. (control connection) Could not retrieve file information Can't get attributes of file '/Test/.proftpd.fifo'. Copying files to remote side failed. Session 'backupuser@fjernskrivebord.tg150.dk' closed. No session. Exit code: 1 Max roundtrip: 5569 D:\Klinikdokumenter\Klinik - EDB\Klinik Backup\NAS Synchronization>
option batch on option reconnecttime 60 option exclude .proftpd.fifo open -passive=on ftp://**********:***************@fjernskrivebord.tg150.dk:8021 synchronize -delete -criteria=either -transfer=binary -resumesupport=on remote "\\backup\backup3\" "/Test/" exit
. 2020-05-14 01:08:29.219 Local file '\\backup\backup3\.proftpd.fifo' [2020-05-11T16:57:20.000Z] [0] included to synchronization
.proftpd.fifo
actually a folder, not a file?
Advertisement
option exclude .proftpd.fifo/
option exclude
is deprecated for years. You should use -filemask
switch instead:
synchronize -filemask=|.proftpd.fifo/ ...
Directory of \\backup\backup3 11-05-2020 18:53 <DIR> . 11-05-2020 12:13 <DIR> .. 11-05-2020 18:57 <DIR> .proftpd.fifo 14-05-2020 20:35 <DIR> Daily Backups 11-05-2020 12:18 <DIR> Old Backups 11-05-2020 12:37 <DIR> Test
synchronize -filemask=|.proftpd.fifo/;"Old Backups/";"Test/" remote "\\backup\backup3\" "/Daily Backups/"
synchronize remote "\\backup\backup3\Daily Backups\" "/Daily Backups/"
Advertisement
You can post new topics in this forum