Re: Work around for include
The problem with 0kB files looks like a bug, I'll check it.
This bug has been added to the tracker:
Issue 451 – Skipped files are shown in progress list on console.
The problem with 0kB files looks like a bug, I'll check it.
option include "E:\budget\dpsearch\; E:\budget\dpsearch\*; E:\budget\dpsearch\*\*; E:\budget\golf\; E:\budget\golf\*; E:\budget\golf\*\*; E:\budget\web\; E:\budget\web\*; E:\budget\web\*\*"
option batch on
option confirm off
open sftp://budgetscp:<pwd>@<IP>
cd /www_backup/OpenJaw/test
option include " E:\budget\dpsearch\*\*; E:\budget\golf\*\*; E:\budget\web\*\*;"
option transfer binary
synchronize remote E:\budget\
close
exit
E:\budget>winscp /script=FTP_Commands.txt
batch on
confirm off
Searching for host...
Connecting to host...
Authenticating...
Using username "budgetscp".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] budgetscp@<IP>
/www_backup/OpenJaw/test
include E:\budget\dpsearch\*\*; E:\budget\golf\*\*; E:\budget\web\*\*;
transfer binary
Comparing...
Local 'E:\budget' => Remote '/www_backup/OpenJaw/test'
Nothing to synchronize.
Session 'budgetscp@<IP>' closed.
No session.
E:\budget\web\
. Let me know if it does not.
option include "E:\budget\web\; E:\budget\web\*; E:\budget\web\*\*;
\*
wildcards until you've reached the lowest level of sub directory.
include
statement works I think it should be changed. When a directory is included in a synchronisation I think the transfer should work recursively ... the way the exclude statement works.
option exclude
is not a good way to do things because the contents of a directory may change over time ... a large log archive for example for grow by several GBs over a matter of a few days ... and these changes would be included in the sync. The include will only ever transfer what you want regardless of the other directory content.
option confirm off
open sftp://budgetscp:<passwd>@<ip>
cd /www_backup/OpenJaw
option exclude "E:\budget\Copy of tomcat\"
option exclude "E:\budget\tomcat\logs\*"
option transfer binary
synchronize remote -criteria=both E:\budget\
close
exit
E:\budget>winscp.com /command /script=ftp.txt
batch on
confirm off
Searching for host...
Connecting to host...
Authenticating...
Using username "budgetscp".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] budgetscp@<ip>
/www_backup/OpenJaw
exclude E:\budget\Copy of tomcat\
exclude E:\budget\tomcat\logs\*
transfer binary
Comparing...
Local 'E:\budget' => Remote '/www_backup/OpenJaw'
Synchronizing...
Local 'E:\budget' => Remote '/www_backup/OpenJaw'
E:\budget\Copy of tomcat | 0 KiB | 0.0 KiB/s | binary | 0%
E:\...\Copy of tomcat\bin | 0 KiB | 0.0 KiB/s | binary | 0%
E:\...\bin\bootstrap.jar | 23 KiB | 1246.4 KiB/s | binary | 100%
E:\...\bin\catalina.bat | 7 KiB | 134.1 KiB/s | binary | 100%
E:\...\bin\catalina.sh | 9 KiB | 87.3 KiB/s | binary | 100%
E:\...\commons-daemon.jar | 9 KiB | 75.8 KiB/s | binary | 100%
E:\...\bin\cpappend.bat | 0 KiB | 53.3 KiB/s | binary | 100%
E:\...\bin\digest.bat | 1 KiB | 34.1 KiB/s | binary | 100%
E:\...\bin\digest.sh | 0 KiB | 25.8 KiB/s | binary | 100%
E:\...\bin\jasper.bat | 2 KiB | 21.1 KiB/s | binary | 100%
E:\...\bin\jasper.sh | 0 KiB | 18.8 KiB/s | binary | 0%
Terminated by user.
E:\budget\web\Copy of tomcat*
E:\budget\web\Copy of tomcat\
E:\budget\web\Copy of tomcat\*
E:\budget\web\Copy of tomcat\*.*
Copy of tomcat
directory is still included no matter what.
option include
method, with slightly more success, but only slightly. Here's the script;
option confirm off
open sftp://budgetscp:<passwd>@<ip>
cd /www_backup/OpenJaw
option include "E:\budget\web\"
option transfer binary
synchronize remote -criteria=both E:\budget\
close
exit
E:\budget>winscp.com /command /script=ftp.txt
batch on
confirm off
Searching for host...
Connecting to host...
Authenticating...
Using username "budgetscp".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] budgetscp@<IP>
/www_backup/OpenJaw
include E:\budget\web\
transfer binary
Comparing...
Local 'E:\budget' => Remote '/www_backup/OpenJaw'
Synchronizing...
Local 'E:\budget' => Remote '/www_backup/OpenJaw'
E:\budget\web | 0 KiB | 0.0 KiB/s | binary | 0%
E:\budget\web\book.jsp | 0 KiB | 0.0 KiB/s | binary | 0%
E:\...\web\book.jsp_new | 0 KiB | 0.0 KiB/s | binary | 0%
E:\...\brochureSearch.jsp | 0 KiB | 0.0 KiB/s | binary | 0%
E:\budget\web\config | 0 KiB | 0.0 KiB/s | binary | 0%
E:\budget\web\css | 0 KiB | 0.0 KiB/s | binary | 0%
E:\budget\web\error.jsp | 0 KiB | 0.0 KiB/s | binary | 0%
E:\budget\web\home.jsp | 0 KiB | 0.0 KiB/s | binary | 0%
E:\budget\web\images | 0 KiB | 0.0 KiB/s | binary | 0%
E:\budget\web\index.jsp | 0 KiB | 0.0 KiB/s | binary | 0%
E:\budget\web\old | 0 KiB | 0.0 KiB/s | binary | 0%
E:\...\packageResults.jsp | 0 KiB | 0.0 KiB/s | binary | 0%
E:\...\packageSearch.jsp | 0 KiB | 0.0 KiB/s | binary | 0%
E:\budget\web\pages | 0 KiB | 0.0 KiB/s | binary | 0%
E:\budget\web\popups | 0 KiB | 0.0 KiB/s | binary | 0%
E:\budget\web\scripts | 0 KiB | 0.0 KiB/s | binary | 0%
E:\...\SessionAdmin.jsp | 0 KiB | 0.0 KiB/s | binary | 0%
E:\...\waitForResults.jsp | 0 KiB | 0.0 KiB/s | binary | 0%
E:\budget\web\WEB-INF | 0 KiB | 0.0 KiB/s | binary | 0%
E:\...\web\xRezError.jsp | 0 KiB | 0.0 KiB/s | binary | 0%
E:\...\web\xRezReset.jsp | 0 KiB | 0.0 KiB/s | binary | 0%
Session 'budgetscp@193.95.150.26' closed.
No session.
web
subdirectory which is empty.
option
commands? Should I be using Windows directory notation or unix?
option exclude <dir>
in a row, or how the include/exclude pipe works mentioned on the last line of the File Mask section.